.URL files and IIS

A client wanted the ability for his users to easily “put an icon on their desktop linking to the site”.

Example of saving a link to desktop Now, that is actually a bit more tricky than it sounds in this day and age of restrictive security in browsers. Running a script is out of the question and I don’t want to download and run an application. Now, users’ internet shortcuts on their desktops are just .url files so a very simple solution is to just stick a “my site.url” file on the server and add a link to it. When the user clicks on it they will be asked to download it and can just save it to their desktop – easy!

If Internet Explorer is their default browser and you have specified a favicon in the webpage then your favicon will even be displayed on the user’s desktop.

Now, just one problem… By default, IIS won’t let you download .url files so when the user clicks on the link you will get a 404 error. In order resolve this, go into MIME Types for IIS and add .url as an extensions. I used “application/internet-shortcut” for the MIME type but there may be better choices. You will have to do an IISRESET for the new setting to kick in…