Reputation: 315
I'm working on a website, and I've run into trouble modifying an HTTP Response header using (client-side) JavaScript. I have exactly zero idea how to do this. I know (roughly) how to make the 'for' loop to modify the header, but I don't know how to access the header within the script. Could y'all fine people help me with this fun task?
Upvotes: 6
Views: 5898
Reputation: 1073968
With client-side JavaScript (JavaScript running in a browser), you can't do this; by the time the JavaScript code runs, the headers have already been processed.
Upvotes: 8