How can I set the Accept Header for a link on a web page?

html, http, javascript

Solution

I figure I might as well put this here for the next thousand people looking at the post. You cannot do it.

Problem

This is mostly an ivory tower question, since I can easily just make a new URL endpoint. But basically, I'd like to be able to serve up CSV when the user has the Accept header configured to include text/csv. That's trivial on the server side, but on the client side I don't know how to set the Accept header unless I'm using XHR or some other "non-browser" client. Is there a way in HTML to set the Accept header in a link or in JS to set the Accept header when using window.location?

Original source