Reputation: 907
after several requests, sometimes a URL on the browser becomes:
does anyone know the reason?
Upvotes: 0
Views: 2932
Reputation: 419
This is used in URLs to indicate where a fragment identifier (bookmarks/anchors in HTML) begins.
I hope this helps: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
Upvotes: 1
Reputation: 3128
The # will quickly force the browser to scroll up/scroll down the user to sections of the HTML content on that page with the ID attribute equal to the one that follows the # symbol.
If I have a <div>
somewhere on the page with an ID of "A",
Pointing my browser to http://www.abc.com/#A
will take me to that div.
A good example is Wikipedia. The sections on a wiki page often are divs and the menu has URL's with #
Upvotes: 1
Reputation: 8144
The # character is used to signal the browser to center the view on a particular named element.
So a link to http://www.example.com/#my-content will center on an element with an id of “my-content”
Many obtrusive javascript libraries will insert links like Javascript Link, hence your mystery # at the end of the uri string. Note that anything that comes after the # will not be passed to the server through GET parameters.
The portion of a URL (including and) following the # is the fragment identifier http://en.wikipedia.org/wiki/Fragment_identifier . It is special from the rest of the URL. The key to remember is "client-side only" (of course, a client could choose to send it to the server ... just not as a fragment identifier):
The fragment identifier functions differently than the rest of the URI: namely, its processing is exclusively client-side with no participation from the server — of course the server typically helps to determine the MIME type, and the MIME type determines the processing of fragments. When an agent (such as a Web browser) requests a resource from a Web server, the agent sends the URI to the server, but does not send the fragment. Instead, the agent waits for the server to send the resource, and then the agent processes the resource according to the document type and fragment value.
Upvotes: 1
Reputation: 25143
From Wikipedia:
The fragment identifier introduced by a hash mark # is the optional last part of a URL for a document. It is typically used to identify a portion of that document. The generic syntax is specified in RFC 3986. The hash mark separator in URIs does not belong to the fragment identifier.
Upvotes: 1
Reputation: 971
That's a hash. If you put something behind that hash symbol, the browser will try to locate the element with that name and actually scroll to it.
It has little meaning if there's no string behind it. Some web building engines and frameworks may make use of them to help you navigate. Having it "empty" is a way to have them, and do nothing.
Upvotes: 1
Reputation: 10830
Is is an internal anchor tag referring to a link in the same page.
You can see the example in the below site. http://www.w3schools.com/html/html_links.asp
Upvotes: 1
Reputation: 5090
It's an anchor, so that the browser goes directly to the specified ID.
The url you gave has an anchor to a null ID, so nothing will happen. But you could imagine an anchor to the top of the page, that's how the "Back to top" button are made.
href="#top"
Upvotes: 2