0

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.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
Ash
  • 8,583
  • 10
  • 39
  • 52

1 Answers1

1

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

Daniel T.
  • 37,212
  • 36
  • 139
  • 206
  • Dammit, 'a feature'.. Guess I best find a different way to do this then lol. Thanks @Daniel – Ash Feb 20 '17 at 04:32