What does # / in URL mean?

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

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

Here I realized that advertiser_id is 2102, but I couldn't figure out what # / dashboard was pointing to?

+6
source share
4 answers

The part of the URL that follows the # character is usually not sent to the server in the page request. If you open your web inspector and look at the request for the page, you will see that the #/dashboard is not included in the request at all.

On a regular (main HTML) web page, the # symbol can be used to refer to a section on the page so that the browser jumps to this section after the page loads.

Fancy javascript-enabled web applications typically use the # character followed by more URL paths, for example www.example.com/some-path#/other-path/etc other-path/etc part of the URL is not visible to the server but it is available for Javascript to read in a browser and apparently display something else based on this url.

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

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

and the second part of the URL may be for Javascript to display a certain kind of page after loading it:

#/dashboard

The # symbol is also used to create a fragment identifier and is also commonly used to refer to a specific piece of content within a web page (for example, to bring the browser to a specific section on the page).

As already mentioned, this makes sense SEO. To index such pages, you may have to use different methods so that the content that is โ€œbehind the # symbolโ€ is available to search engines.

+9
source

# character is called anchor, it is redirected to a specific position on the html page.

This is a scanning technique, you can read more Here

+1
source

Providing another example

Here's a github request for java class source code

https://github.com/spring-cloud/spring-cloud-consul/blob/master/spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/serviceregistry/ConsulServiceRegistry.java

Adding this to "# L90", the web browser will execute the same request and then go to line 90 and highlight the code.

https://github.com/spring-cloud/spring-cloud-consul/blob/master/spring-cloud-consul-discovery/src/main/java/org/springframework/cloud/consul/serviceregistry/ConsulServiceRegistry.java# L90

Your web browser made the same request to the github server, but in the attached case it performed an additional action to highlight the selected line after receiving a response.

+1
source

after # - location hash ;! The search engines below are used to help index AJAX content. After that, there can be anything, but it is usually visualized as a path (therefore, /)

0
source

All Articles