Jump to content

Force download in Internet Explorer


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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...