Ticket #1837 (closed defect: fixed)

Opened 2 years ago

Last modified 16 months ago

dojo.back doesn't work if you set document.domain

Reported by: guest Owned by: alex
Priority: normal Milestone: 0.9
Component: General Version: 0.4
Severity: normal Keywords: document domain document.domain
Cc:

Description

When using document.domain for pages, dojo does not function correctly or returns errors. For instance, when using the back button fix an Error object is alerted when my page loads. This alert goes away if i do not include dojo.js at all or if i comment out djConfig. These errors occurred under IE6 and IE7.

<script type='text/javascript'>

document.domain = 'mydomain.com';
djConfig = {
  preventBackButtonFix : false
};
</script>
<script type='text/javascript' src='/js/dojo/dojo.js'></script>

This error can be fixed by simply defining the same document.domain in iframe_history.html (which the back button fix uses).

There should be some variable in djConfig allowing the document.domain to be set for all documents that need it. I haven't checked, but I assume this also affects a lot of other embedded .html files or dynamically created documents when using dojo. For now the only sure fix would be to add in a document.domain for any embedded iframes that use it.

Change History

Changed 22 months ago by dylan

  • owner changed from anonymous to alex
  • milestone set to 0.9

Changed 16 months ago by bill

  • summary changed from document.domain settings to dojo.back doesn't work if you set document.domain

Changed 16 months ago by alex

  • status changed from new to closed
  • resolution set to fixed

(In [9877]) style nits. comments and docs need fixing badly. Fixes #1837

Changed 16 months ago by alex

note that the page actually must be served somewhere on "mydomain.com" for the fix in [9877] to work

Note: See TracTickets for help on using tickets.