Jump to content

Force download in Internet Explorer


Wibbskii

Recommended Posts

How do I write a download link that forced download in Internet Explorer?

I have this link and it works perfect in Chrome, Safari and Firefox bit in IE it opens the file.

<a href="/files/CTC.vpd" download="CTC.vpd">Ladda ned uppdatering här (för Internet Explorer högerklicka och välj spara mål som)</a>

Anyone knows?

Link to comment
Share on other sites

You'll have to configure the server to send .vpd files with a Content-Disposition of "attachment"

 

Some servers can be configured with a .htaccess file in the directory, but others need to be changed from the server configuration files.

<IfModule mod_headers.c><FilesMatch ".vpd$">    Header set Content-Disposition "attachment"</FilesMatch></IfModule>

This is for apache servers.

Link to comment
Share on other sites

Thanks for your answer. I tried to add that in the .htaccess but that did not work. Where in the apache server is it that i put that code? In the virtual host file?

 

As a backup plan it could be enough to get the right filename when I "Save target as". Now I don't get the .vpd in the filename on Internet Explorer. How do I do that?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...