The url parameter of the XMLHttpRequest.open() method

After having done some more testing I'm quite convinced that Internet  
Explorer stores the base URI the moment you construct the object. When the  
other window is removed for instance, or a different URI is loaded in it,  
the base URI stays the same.

   http://tc.labs.opera.com/apis/XMLHttpRequest/open/015.htm
   http://tc.labs.opera.com/apis/XMLHttpRequest/open/016.htm

I added this to section 2.:

     When the constructor is invoked the XMLHttpRequest
     base resource identifier reference must be set to
     the value of the baseURI attribute of the Document
     object that's associated with the Window object
     which initially had XMLHttpRequest as an attribute
     of which the constructor was invoked. When baseURI
     is null there is no XMLHttpRequest base resource
     identifier reference.

I changed some text in open() to read:

     When url is a relative reference, it must be
     resolved using XMLHttpRequest base resource
     identifier reference. If that's not defined, or
     there's a failure in resolving user agents must
     throw a SYNTAX_ERR. When a non same-origin url
     argument is given user agents should throw a
     SECURITY_ERR exception.

The only thing left to here is what happens to fragment identifiers. I  
suppose the options are:

  1. Silently dropping them;
  2. Throwing a SYNTAX_ERR exception;
  3. Ignoring the invocation of open();

I hope Internet Explorer does 1...


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Saturday, 30 September 2006 15:33:13 UTC