same domain restriction

3 views
Skip to first unread message

tomw

unread,
Nov 26, 2007, 5:31:40 PM11/26/07
to ReallySimpleHistory
Just a note really that I've noticed that blank.html must be hosted on
the same domain as the core application for the app to work in IE.
It's not sufficient for blank.html to be on the same domain as rsh.js
as the code takes its permissions from the page domain, not the
Javascript domain.

For reference, the following works fine:
main page: www.mydomain.com
javascript: www.mydomain.com/rsh.js
blank: www.mydomain.com/blank.html

As does the following:
main page: www.mydomain.com
javascript: www.ajaxdomain.com/rsh.js
blank: www.mydomain.com/blank.html

The following does NOT work:
main page: www.mydomain.com
javascript: www.ajaxdomain.com/rsh.js
blank: www.ajaxdomain.com/blank.html

This is only really a problem for people (like me) using Ajax to
syndicate applications, but I can't immediately see away around it...

By the way, great app and will let you know once I have it live.

Tom.

bdpath...@gmail.com

unread,
Nov 27, 2007, 11:56:23 AM11/27/07
to ReallySimpleHistory
Interesting. I've added this as an enhancement ticket over at Google
Code. The "blank.html" problem has been the bane of history frameworks
for a long time. I wonder if there would be a way to just load the
parent domain's 404 page by calling a URL that you know wouldn't be
valid, then injecting the relevant onload code into that page via
JavaScript before attempting to use history. I know other history
frameworks have worked hard to hack it so that you only need to load
blank.html once. After that, you just update it dynamically from your
parent window. I'm not certain this is something I would get to
anytime soon, but I will track the issue at Google Code. If Tom or
anybody else cares to tackle this problem in their spare time, please
post to this list or to the ticket, which is here:

http://code.google.com/p/reallysimplehistory/issues/detail?id=32
Reply all
Reply to author
Forward
0 new messages