Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

window location host vs origin

console.log(window.location.host); // localhost:3000
console.log(window.location.hostname); // localhost
console.log(window.location.origin); // http://localhost:3000
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #window #location #host #origin
ADD COMMENT
Topic
Name
2+1 =