public satanic void
public satanic void

Reputation: 460

Use of /#/ in the middle of a URL

I recently came across a web application whose URLs have the form:

https://URL.com/page/uuid/#/anotheruuid/area?action=whatever

I am confused as to the use of # in the URL. Usually, the pound symbol is reserved for fragment identifiers, which go at the end of a URL. What is the use here and what is its purpose?

Upvotes: 8

Views: 5267

Answers (1)

Baumi
Baumi

Reputation: 1765

This is commonly used in SPAs (Single Page Applications). The purpose is to be able to navigate between different pages without reload the whole application. It is information to the client side framework / library to be able to route the app correctly.

For example one of the most common framework - Angular - supports two Location Strategies:

  1. HashLocationStrategy where URL looks like http://localhost/#/product
  2. PathLocationStrategy where URL looks like http://localhost/product

(source)

Upvotes: 13

Related Questions