By default, modern browsers prefer to open "viewable" files—such as PDFs, images, or text documents—directly in a new tab or window instead of initiating a download. Developers have two primary ways to override this behavior:
For a more robust solution, servers can send an HTTP header that explicitly dictates how the file should be handled. Download File Maya Shavin Raymond Camden - Fron...
Content-Disposition: attachment; filename="example.pdf" : This forces the browser to open a "Save As" dialog. Programmatically downloading files in the browser By default, modern browsers prefer to open "viewable"