Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modify HTTP response header with (Client-side) Javascript

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?

like image 695
bluebunny Avatar asked Mar 20 '23 22:03

bluebunny


1 Answers

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.

like image 190
2 revs, 2 users 67% Avatar answered Apr 01 '23 12:04

2 revs, 2 users 67%