Last Comment Bug 433509 - Notes on usage of document.domain missing one important thing
: Notes on usage of document.domain missing one important thing
Status: RESOLVED FIXED
:
Product: Developer Documentation
Classification: Other
Component: General (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Eric Shepherd [:sheppy]
:
Mentors:
http://www.mozilla.org/projects/secur...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-13 07:36 PDT by Peter Kehl
Modified: 2013-04-11 12:44 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Example to test cross-domain JS with document.domain (1.37 KB, application/x-gzip)
2008-05-13 07:36 PDT, Peter Kehl
no flags Details

Description Peter Kehl 2008-05-13 07:36:26 PDT
Created attachment 320712 [details]
Example to test cross-domain JS with document.domain

Hi, would you consider adding the following section to the bottom of the page. See also the attached package, which I used to test in Firefox 2.0.0.14 on Mac OS X. When I didn't set document.domain in the higher (parent) domain, then I was still getting permission errors.

Note that you need to  set <i>document.domain</i> in both the subdomain and the parent domain to the same value. You need to do that
even when setting document.domain in the parent domain to its 'native' (original) domain. It's not enough to set it only on the subdomain part. Otherwise you'd still get permission errors.
Comment 1 David Boswell 2008-09-16 10:27:49 PDT
This page had been moved over to MDC but a redirect was missing.  I just set a redirect up to the correct page at

http://developer.mozilla.org/En/Same_origin_policy_for_JavaScript

Changing product to Mozilla Developer Center to discuss original issue of adding additional information to the page.
Comment 2 Eric Shepherd [:sheppy] 2013-04-11 12:44:38 PDT
Updated the article.

Note You need to log in before you can comment on or make changes to this bug.