javascript - Whats the difference between window.location.host and window.location.hostname -
this question has answer here:
they both seem give me same thing (the domain name executing script).
so what's difference (if any) , should each used?
https://developer.mozilla.org/en/window.location
host....
: host name , port number. [www.google.com]:80
hostname
: host name (without port number or square brackets). www.google.com
Comments
Post a Comment