Instead of Downloading, Files Are Opening in Browser

Download file is opening the file directly in Chrome browser with IIS, Not downloading the file

I noticed that this is Chrome's feature and to turn it off I did the following steps:

  1. Go to setting by clicking on 3 dots on the right corner of the browser
  2. Click on the "Advanced" button at the bottom of the page.
  3. Go to the "Downloads" section
  4. Click on the "Clear" button beside "Open certain file types automatically after downloading"

How to force open links in Chrome not download them?

To make certain file types OPEN on your computer, instead of Chrome Downloading...

You have to download the file type once, then right after that download, look at the status bar at the bottom of the browser. Click the arrow next to that file and choose "always open files of this type". DONE.

Now the file type will always OPEN using your default program.

To reset this feature, go to Settings / Advance Settings and under the "Download.." section, there's a button to reset 'all' Auto Downloads

Hope this helps.. :-)

Visual Instructions found here:

http://www.presentermedia.com/blog/2013/10/my-file-automatically-opens-instead-of-saving-with-chrome/

Controller opens file in the browser instead of downloading it

Removing response.flushBuffer(); has fixed my issue.

Opening files in browser instead of downloading

add target="_blank" to get a new window. adding .pdf may help. If you have control over the host web server adjusting the headers for the files in question will also help it open inline. I can tell you what headers to set if you are able too

How to force a Download File prompt instead of displaying it in-browser with HTML?

This is something that you cannot absolutely control with HTML itself.

If the user is having a browser with PDF reading capabilities (or a plugin) and the corresponding settings to open PDF files in-browser, the PDF will open like that.

The PDF opens in a new tab simple because of your target="_blank", which has nothing to do with a download prompt.

If you are using HTML5 you can use the download attribute:

<a href="sample.pdf" download="sample.pdf">Download</a>

If you have a back-end service which you can control or you feel like fiddling with your Web Server, you can always look for setting the right Content-Disposition. See this SO question for some nice discussion on Content-Disposition.



Related Topics



Leave a reply



Submit