Wibbskii Posted October 6, 2014 Share Posted October 6, 2014 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 More sharing options...
niche Posted October 6, 2014 Share Posted October 6, 2014 what do you mean by "forced"? Link to comment Share on other sites More sharing options...
Wibbskii Posted October 7, 2014 Author Share Posted October 7, 2014 I mean that when a user clicks on the link it should not open in web browser. It should be downloaded as it does in Chrome, FF and Safari Link to comment Share on other sites More sharing options...
Ingolme Posted October 7, 2014 Share Posted October 7, 2014 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 More sharing options...
Wibbskii Posted October 7, 2014 Author Share Posted October 7, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now