W3C home > Mailing lists > Public > public-webapi@w3.org > September 2006

The url parameter of the XMLHttpRequest.open() method

From: Anne van Kesteren <annevk@opera.com>
Date: Sat, 30 Sep 2006 17:32:55 +0200
To: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.tgo6s5a564w2qv@id-c0020>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:55 GMT