133
rated 0 times
[
134]
[
1]
/ answers: 1 / hits: 41502
/ 14 Years ago, wed, january 5, 2011, 12:00:00
What's the difference between using
if (document.domain.toLowerCase().indexOf(domainName) != -1)
and
if(window.location.href.match(/://(.[^/]+)/)[1].toLowerCase().indexOf(domainName) != -1)
and
if(window.location.hostname.toLowerCase().indexOf(domainName) != -1)
I'm just trying to match on a certain domainName and want to use the best approach.
More From » dns