Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 787
Plato Avatar asked Dec 29 '17 21:12

Plato


People also ask

How do you use a semicolon?

Use a semicolon to join two related independent clauses in place of a comma and a coordinating conjunction (and, but, or, nor, for, so, yet). Make sure when you use the semicolon that the connection between the two independent clauses is clear without the coordinating conjunction.

What is a semicolon example?

Here's an example: I have a big test tomorrow; I can't go out tonight. The two clauses in that sentence are separated by a semicolon and could be sentences on their own if you put a period between them instead: I have a big test tomorrow.

When to use a colon or a semicolon?

Semicolons should introduce evidence or a reason for the preceding statement; for example, this sentence appropriately uses a semicolon. A colon, on the other hand, should be used for a stronger, more direct relationship. It should provide emphasis, an example, or an explanation.

What is the symbol for colon?

The colon ( : ) and semicolon ( ; ) are frequently used incorrectly in place of each other. The two punctuation marks serve very different purposes, and should not be used interchangeably.


1 Answers

This is commonly used in SPA's (Single Page Applications). The purpose is to be able to move between different pages without reload the whole page. It is information 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)

like image 155
Baumi Avatar answered Oct 23 '22 09:10

Baumi