Home / Web servers / Forcing a browser to prompt to save certain files

Forcing a browser to prompt to save certain files

Secret documents and sim card
Question: I am distributing sensitive forms to my clients and want to make sure they download them rather than opening them in their browser. Is there a way to force the web server to prompt them for download rather than using a browser plugin?

Answer: Yes, using .htaccess you can force most browsers open a “save as” prompt rather than opening a particular file type with a browser plugin. Add the following to an .htaccess file inside the directory with the files:

AddType application/octet-stream .pdf
AddType application/octet-stream .doc
AddType application/octet-stream .txt

Nevertheless, nothing is barl proof. If you want to make sure your clients will save the documents, there is no substitute for good education. Make sure they know how to do and that you mark that clearly on the download page. If you want to be particularly diligent, you can even add a popup window to remind them again before they click the link.

Photo Source: Flickr

Check Also

Uk data center

Professional Data Centres In The UK

A professional data centre is a location in which various pieces of hardware are located …

Powered by Namesco
© Copyright InternetBlog.Org.Uk 2024, All Rights Reserved