Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Firefox 3.6.13 ajax setRequestHeader('User-Agent', '...') don't work

  • 4 प्रत्युत्तर
  • 49
  • 4426 views
  • के द्वारा अंतिम प्रतियुतर dawpa2000

more options

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)

more options

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...

more options

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.

more options

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.

more options

Overriding the user agent is not allowed. This is not a bug.

http://www.w3.org/TR/XMLHttpRequest/#the-setrequestheader-method