I have an XML file that is only available by going to domain.com/file.xml. When someone visits the link I want it do be downloaded and not opened in the browser. There will be no physical link to this, just the domain link that has to be put in the address bar.
Any ideas?
The best way is to specify specific headers, for example using PHP.
The PHP documentation provides a nice example:
Add the code above to
download.phpand upload the file to thefile.xmldirectory.Now you can download the file by visiting
domain.com/download.php.This is the best cross browser compatible solution.
Other server side languages can also do the job.