
Firefox 3.6.13 ajax setRequestHeader('User-Agent', '...') don't work
I did a javascript and in new Firefox version (3.6.13) don't overwrite the "User-Agent" Header in XMLHttpRequest.
Is this a new security feature? :S
The code:
jQuery.ajax({ beforeSend: function(xhr){xhr.setRequestHeader('User-Agent', '...');}, url: "...", dataType: 'xml', success: ... });
cor-el द्वारा
All Replies (4)
I'm seeing this same issue. What is the status of a patch to correct this? It has broken all our AJAX code that sets the UA to ID itself to our servers...
I experience the same. Is this indeed a new security feature (like on Chrome), or will this be patched again so it can be set again? It broke a vital component of a critical application for me.
I contacted Mozilla support for information on this bug, and they were completely useless.
I have searched and searched for more information on this bug, and this is about the only place I found this problem reported. I went into Bugzilla and searched Firefox bugs, and there is nothing about this problem.
So I have opened a new bug against Firefox to get this fixed -- https://bugzilla.mozilla.org/show_bug.cgi?id=627942
Please who are hampered by this stupid bug in Firefox can follow and comment on that bug.
Overriding the user agent is not allowed. This is not a bug.
http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader-method