I have a link pointing to an xml file. Instead of prompting the user to download the file, it just opens the file. How can I ensure that the user is prompted to download the file?
You can't. Especially not with HTML. If the browser believes it knows how to handle certain file type, it will attempt to open it in the browser. What you could do, is deliver this xml file with a different mime type. That way you can fool the browser into thinking it something that it doesn't know and so it forces the download. But that would definitely fall out of scope of this forum -- you would need to ask in the respective fora for your server or server-side scripting.
___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
Mabye you can Zip the file so it has to be downloaded. it will make the file smaller and therefore it will move faster too. (This will only work if you have access to that server and can make the file a Zip file.)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.