916 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			916 B
		
	
	
	
	
	
	
	
title
| title | 
|---|
| Window Location | 
Window Location
The window.location object can be used to get information on the current page address (URL) and to redirect the browser to a new page.
The window.location object can be written without the window prefix, as just location.
Some examples:
- window.location.hrefreturns the href (URL) of the current page
- window.location.hostnamereturns the domain name of the web host
- window.location.hostreturns both the host name and any associated port
- window.location.pathnamereturns the path and filename of the current page
- window.location.protocolreturns the web protocol used (http: or https:)
- window.location.assign()loads a new document