views:

20

answers:

1

I have a webserver with the following host name and DNS alias name.

Host name - server1.aa.xx.company.com
Alias name - server1.bb.xx.company.com

In the above scenario, what will be the value of JavaScript DOM object document.domain? Will it be server1.aa.xx.company.com or will it be server1.bb.xx.company.com?

+2  A: 

what will be the value of JavaScript DOM object document.domain

It will be the domain the page was requested in the browser on. Javascript isn't interested in DNS aliases - just in what it says in the browser's address bar.

Pekka