Skip to content Skip to sidebar Skip to footer

Browser Opening Text/xml In External Program

Is there a smart way to - from a browser - open hrefs to text files and XML files in an external program. My target platform is Win32 so preferably I'd have the files open in the d

Solution 1:

To force the browser of the user to download a file instead of viewing it, you could add the following line to the HTTP response header:

Content-Disposition: attachment; filename="<file name.ext>" 

Solution 2:

When you are dealing with links to files, you cannot change the launch application on the server side of things. This would be a behavior that the user would need to configure on their side via the settings of their browser.


Solution 3:

I am no html expert, but maybe you should just change the link from a href to a download. Textfiles i.e. should then be opened with notepads.


Solution 4:

It does not seem possible to solve (easily). I give up.


Post a Comment for "Browser Opening Text/xml In External Program"