Gerhard Fiedler wrote: > Dave seemed to imply that a relative URL may include a scheme or a > server (the "user:password@host:port" part he mentioned). I'm not sure > this is correct. Sorry, I was trying to be succinct, but lost some clarity in the process. "http:path/item.html" is a perfectly valid partial URL that overrides the scheme, but is still relative to the current document's path (or the base path, if given), not absolute. "http:/path/item.html" is an absolute path, but relative to the default server's root. "http://www.server.com/path/item.html" is another absolute path, to a particular server. Note that it is not possible to specify a server without using an absolute path on that server. The same thing applies even if the scheme is not explicitly given in the partial URL: "path/item.html" - relative "/path/item.html" - absolute on default server "//www.server.com/path/item.html" - absolute on explicit server > However, if your base URL contains a path part in addition to the server > (like "http://myserver/basepath/"), things become a bit ambiguous. What > means a "relative" URL of the type "/path1/path2/file.ext", in the > context of this base URL? Would this expand to > (accepting the base URL > as base for all paths that don't specify a server) No. > or to (accepting the idea that a > starting slash means the top level directory that is accessible on the > specified server)? Yes. > > In a relative URL, we should never see //. > > Not at the beginning, but in the middle of the path part it's perfectly > legal. Yes. > > If the URL starts with /, we're starting at the base or root of the > > server directory tree. > > Actually, if it starts with /, you're referencing the local file system. No, unless the scheme is switched to "file" instead of "http". Note, your browser may be making that switch for you in the interest of convenience, but that's not part of the specification. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist