Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the URL fragment identifier sent to the server? [duplicate]

Possible Duplicate:
Can PHP read the hash portion of the URL?

The (famous?) web site mega.co.nz uses a hash mark in URLs to link to encrypted files; the portion of the URL after the hash mark contains a password, and encryption is claimed to happen on the client side. It is certainly feasible to use javascript for client-side encryption but … isn't the URL sent to the server, thus revealing the password to the server itself?

The URL looks like

https://example.com/#!encryptedfilename_password
like image 513
vincenzoml Avatar asked Jan 22 '13 15:01

vincenzoml


People also ask

How do URL fragments work?

A fragment is an internal page reference, sometimes called a named anchor. It usually appears at the end of a URL and begins with a hash (#) character followed by an identifier. It refers to a section within a web page. In HTML documents, the browser looks for an anchor tag with a name attribute matching the fragment.

Can a URL have multiple fragments?

A URL cannot have more than one fragment. URL parameters are passed in key-value pairs. URL fragments comprise just a string of text after the hash (#). Changing the URL parameters or their values and hitting enter reloads the page.

What is the main purpose of a fragment in the URL address?

A fragment identifier is used to point a web browser to a reference or function in the item that it has just retrieved. For example, if the URL identifies an HTML page, a fragment identifier can be used to indicate a subsection within the page, using the ID of the subsection.

What part of URL is not sent to the server and used only by the browser?

Explanation: Basically the hash component of the page URL (the part following the # sign) is processed by the browser only - the browser never passes it to the server.


Video Answer


1 Answers

Fragment identifiers are not sent to the server. The hash fragment is used by the browser to link to elements within the same page.

like image 124
aziz punjani Avatar answered Oct 11 '22 23:10

aziz punjani