Internet explorer 10 automatically encodes url in xmlhttprequest

Is there any way around IE10 from auto url encoding before sending ajax request?

Here is an example:

  var req = new XMLHttpRequest ();
 req.open ('GET', '/index.html#fragment', false); 
 req.send (null);
 if (req.status == 200)
     console.log ("req.responseText:" + req.responseText);

IE10 F12 Developer Tool Network Bar Indicates Sent Request

/index.html%23fragment

My server received the same encoded URL.

This does not happen with other browsers, and the specification clearly states that the browser must remove the fragment from the URL before executing the request → http://www.w3.org/TR/XMLHttpRequest/#the-open()-method

Thanks.

+4
source share

All Articles