Chrome force download file






















Fandango68 Fandango68 3, 2 2 gold badges 34 34 silver badges 59 59 bronze badges. Balaji Mitkari Balaji Mitkari 70 3 3 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.

Podcast what if you could invest in your favorite developer? Who owns this outage? Building intelligent escalation chains for modern SRE. Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer.

Linked 6. Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. In an effort to make modern browsers more user friendly, their developers have started to display content inside the web browser that used to require an additional application to view or a user may want to download instead.

Many browsers such as Microsoft Edge, Mozilla Firefox, Apple Safari, and Google Chrome have the default behavior of viewing the file in the browser window instead of prompting the user to save the file to a location. As long as you have the ability to edit the HTML code of the page, you can use a simple HTML tweak that will allow you to control when the file download prompt appears if the user clicks a link or a button.

In some cases, the name of the file that is stored on the web server is not the most useful to the user. As of this post, all major desktop browsers excluding Microsoft IE support the download attribute. It is likely that people who use these browsers would likely rather view the document rather than saving it to their phone.

New to HTML 5. This markup is easier to understand and is supported by all modern browsers, but may not be supported by all content management systems. If for whatever reason, you cannot add the download attribute in the case that you cannot directly edit the HTML of your web page , you can optionally compress the file using zip, and instruct the user to download the zip file. You can alternatively explain to the user that they should right click on the link and select download.



0コメント

  • 1000 / 1000