Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express request url ignores hash

The part of the URL starting with the # symbol is never sent to the server.

The # symbol in an URL is to introduce the fragment identifier. 
This is used to link to a specific part of the page. If a browser loads 
/#some/url, it will effectively load /, and skip to the HTML element 
with id="some/url" (if present). The fragment identifier is only relevant 
to the browser, so it is not sent with the HTTP request.

What you however can do, is using client side Javascript to read out the 
value of window.location.hash and send it to the server using 
an XMLHttpRequest.
 
PREVIOUS NEXT
Tagged: #express #request #url #ignores #hash
ADD COMMENT
Topic
Name
9+2 =