Java Reference
In-Depth Information
window.location.search
<<
"?utm_source=sitepoint&utm_medium=link&utm_content=top-nav"
The hash property returns a string that starts with a " # " followed by the fragment identi-
fiers. It returns an empty string if there are no fragment identifiers:
window.location.hash
<< ""
The origin property returns a string that shows the protocol and domain where the cur-
rent page originated from. This property is read-only, so cannot be changed:
window.location.origin
<< "https://learnable.com"
The window.location object also has these methods:
• The window.location.reload() method can be used to force a reload of
the current page. If it's given a parameter of true , it will force the browser to re-
load the page from the server, instead of using a cached page.
• The window.location.assign() method can be used to load another re-
source from a URL provided as a parameter, for example:
window.location.assign("http://www.sitepoint.com/")
• The window.location.replace() method is almost the same as the win-
dow.location.assign() method, except that the current page will not be
stored in the session history, so the user will be unable to navigate back to it using
the back button.
Search WWH ::




Custom Search