how do we set the content type header for a page not served from a server? (i.e. a simple local file saved to desktop)
Say i have a .xml file that i would like to open as application/xml
in google-chrome. how do i specify it?
Now i want to open that same file under text/xml
with google-chrome is that an option?
My file:
<?xml version="1.0"?>
<test></test>
Headers are only sent to and served by servers. Without a server, there is no such thing as a request, or a response, and therefore there will be no content-type header to receive.
If you are trying to keep this local, you can open it on a localhost server setup. IIS and Apache (and many others) will run on your local development box, no problem.
No, you can't. HTTP header exists only if it's a HTTP request or response. AFAIK, you can't set more than 1 association to a single file type in your web browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With