#7424 closed bug (worksforme)
setRequestHeader IE
Reported by: | uthomas | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | ajax | Version: | 1.4.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi there again.
I'm afraid last time my ticket was handled as spam... I'm trying to add a custom header to each dynamic HTTP Request and it seems working fine in FF, Safari, Chrome, and Opera but not under IE 8 (build: 8.0.7600.16385).
Morover I can't see either the "x-requested-with" header in IE.
Here is my code:
$.ajaxSetup({ beforeSend : function(xhr) { xhr.setRequestHeader("custom-header", "custom-value"); } }); $('#button').click(function() { $.ajax({ url : '/valid-url', success: function(data){ alert(data); } }); });
Best regards: U. Tamás
Change History (6)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
:)
With the added two lines the "custom-header" has been sent in IE as well... :S I find it weird that without explicitly telling the request-method (POST|GET) the request header doesn't contain the "custom-header" in IE, but it works in other browsers. :)
Best regards: U. Tamás
P.S.: jQuery is great! Just keep go on!
comment:3 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
Component: | unfiled → ajax |
---|---|
Priority: | undecided → low |
comment:5 Changed 12 years ago by
http://stackoverflow.com/questions/6386884/sending-post-message-with-ajax-problem
Still there is some problem I guess.
comment:6 Changed 11 years ago by
setRequestHeader() does not work at all. How can it be a low priority?
Hi,
At least "X-Requested-With" works in IE too, but I had to add:
to the the parameter-list of $.ajax call. :) So my code looks like this now: