December 2013
Intermediate to advanced
384 pages
9h 54m
English
location.hostname
The location.hostname value returns the domain name of the server that sent the page to the user. This is just the portion after the protocol but before the port number or path. This allows you to determine which server to send AJAX requests back to. Often, multiple servers may handle the web site, but you may want to interact only with the server that served the web page in the first place.
Read now
Unlock full access