javascript - Whats the difference between window.location.host and window.location.hostname -


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

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -