urluriurn

I don't understand this URI and more


I have this URI http://a/b/c/d;p?q and I don't understand the ";". What does it do? I was told that "p" is a parameter, but who does receive it?

Also, I want to know the different between absolute URI, base URI, relative URI and URI reference.

Thank you in advance. ( ^_^)b


Solution

  • Run from the structure of URL. You can read more about it in http://www.skorks.com/2010/05/what-every-developer-should-know-about-urls/ and http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding (good examples)

    <scheme>://<username>:<password>@<host>:<port>/<path>;<parameters>?<query>#<fragment>

    Each path segment may include a sequence of parameters, indicated by the semicolon ";" character.

    Parameters (delimited with semicolon) should be processed by web server. However it doesn't have wide usage and might not be supported by web server. Its usage is discussed in these SO posts: Semicolon as URL query separator, https://stackoverflow.com/a/26489224/4573999

    Absolute URL is a URL that at least contains base: protocol (ex., http://, ftp://) and site name (first segment of URL). Ex., http://google.com/search. Here we have base http://google.com and path (segment) /search

    Base URL defines the point to start off for all relative URLs in document. Ex., <base href="http://example.com/myfolder">

    The HTML Base Element () specifies the base URL to use for all relative URLs contained within a document. There can be only one element in a document.

    See MDN description for this tag

    Relative URL specifies path to a resource starting from a base. Ex., href="/images/funny.png".

    If relative URL start with / it goes from the root of the base (site name), i.e. ignores the path supplied in base.

    By default if base is not supplied it is assumed to be the URL of the document that contains the relative URL. It is convenient to supply link to resources (like images) using relative URLs. In this case you can easily move domain where document is published and links won't get broken.

    URL reference AFAIK is a synonym to any URL. It stresses the fact the URL is a reference not an object itself.