Ash
Ash

Reputation: 9091

Set document.domain back to its original value in all browsers?

Having a bit of trouble with document.domain - I can set it to the base domain but cannot set back to its original value (subdomain + domain) in FireFox or Edge, though it does work in Opera.

I have read a lot of documentation and doesn't seem to be mention of this limitation anywhere.

Upvotes: 0

Views: 65

Answers (1)

Daniel T.
Daniel T.

Reputation: 38410

This is a feature of the single origin policy protection. A subdomain can be changed to its parent domain, but not back again, because different subdomains can point to different hosts.

I thought cross-subdomain AJAX requests were allowed, but this Chrome error seems to indicate otherwise

Upvotes: 1

Related Questions