Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
35
rated 0 times [  36] [ 1]  / answers: 1 / hits: 154137  / 14 Years ago, wed, december 1, 2010, 12:00:00

Can I control the HTTP headers sent by window.open (cross browser)?



If not, can I somehow window.open a page that then issues my request with custom headers inside its popped-up window?



I need some cunning hacks.


More From » window.open

 Answers
40

Can I control the HTTP headers sent by window.open (cross browser)?




No




If not, can I somehow window.open a page that then issues my request with custom headers inside its popped-up window?





  • You can request a URL that triggers a server side program which makes the request with arbitrary headers and then returns the response

  • You can run JavaScript (probably saying goodbye to Progressive Enhancement) that uses XHR to make the request with arbitrary headers (assuming the URL fits within the Same Origin Policy) and then process the result in JS.




I need some cunning hacks...




It might help if you described the problem instead of asking if possible solutions would work.


[#94775] Monday, November 29, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gideonb

Total Points: 187
Total Questions: 101
Total Answers: 86

Location: North Korea
Member since Mon, Feb 27, 2023
1 Year ago
;