What does #/ means in url?

RajSharma picture RajSharma · Aug 12, 2016 · Viewed 26.7k times · Source

I am working on ROR web apps. My webpage url looks like below-

http://dev.ibiza.jp:3000/facebook/report?advertiser_id=2102#/dashboard

Here I understood that advertiser_id is 2102 but I couldn't understand what #/dashboard is pointing to?

Answer

Ben Cole picture Ben Cole · Aug 12, 2016

The portion of the URL which follows the # symbol is not normally sent to the server in the request for the page. If you open your web inspector and watch the request for the page, you will see that the #/dashboard portion is not included in the request at all.

On a normal (basic HTML) web page, the # symbol can be used to link to a section within the page, so that the browser jumps down to that section after the page loads.

In fancy javascript-heavy web applications, the # symbol is commonly used followed by more URL paths, for example www.example.com/some-path#/other-path/etc the other-path/etc portion of the URL is not seen by the server, but is available for Javascript to read in the browser and presumably display something different based on that URL path.

So in your case, the first part of the URL is a request to the server:

http://dev.ibiza.jp:3000/facebook/report?advertiser_id=2102

and the second part of the URL could be for Javascript to display a specific view of the page once it has loaded:

#/dashboard

The # symbol is also used to create a Fragment Identifier and is also typically used to link to a specific piece of content within a web page (such as to cause the browser to jump down to a particular section on the page).

As others have mentioned, this has SEO implications. In order to index pages such as this, you may have to employ different techniques to allow the content that is "behind the # symbol" to be accessible to search engines.