I have plans to apply AJAX to our library catalog but I’m running into a problem where I can’t do XMLHttpRequest events to servers other than the one I loaded the main webpage from. Mozilla calls it the “same origin policy,” everyone else calls it a cross-domain script exclusion, or something like that.
Some Mozilla folks are working on a standard to address the problem, but it could be quite a while before browser support is common enough to build for it.
So Plan A was to use simple AJAX with XMLHTTPRequest. Plan B comes from this crazy suggestion at Apple’s developer site: Remote Scripting with IFRAME. It looks like different functions are subject to different restrictions, so the theory is that a JavaSctript loaded in a page in a hidden IFRAME can call functions from the parent page and do pretty much everything we’ve come to expect of XMLHTTPRequest. Here’s an example they offer.
Crazy as it is it works, and it gets around some cross-domain script exclusions for some browsers, but it still gets trapped by Mozilla.
tags: ajax, apple, browser security, browsers, cross domain, cross domain script exclusion, frustration, iframe, javascript, mozilla, remote scripting, web application, web applications, xdomain, xmlhttprequest
Posted September 19, 2005 by Casey Bisson
Categories: Libraries & Networked Information, Technology. Tags: ajax, apple, browser security, browsers, cross domain, cross domain script exclusion, frustration, iframe, javascript, mozilla, remote scripting, web application, web applications, xdomain, xmlhttprequest.
5 Comments
Comments RSS
TrackBack Identifier URI
Leave a comment
User contributed tags for this post:
cross domain iframe (380) - iframe cross domain (353) - xmlhttprequest cross domain (206) - ajax cross domain (184) - javascript cross domain scripting (183) - iframe domain (154) - xmlhttprequest cross site (119) - iframe cross domain script (118) - cross domain ajax (102) - cross domain scripting iframe (101) - iFrame cross site (94) - cross domain xmlhttprequest (82) - enable cross site scripting (74) - iframe cross domain scripting (73) - cross domain javascript (69) - cross domain ajax iframe (66) - jquery iframe (58) - crossdomain javascript (58) - Cross domain iframes (57) - remote scripting iframe (56) - ajax Iframe (55) - allow cross site scripting (55) - Cross Domain Javascript iframe (53) - firefox cross domain scripting (52) - javascript cross domain (51) - ajax cross domain iframe (50) - javascript cross domain iframe (50) - cross site iframe (50) - cross domain iframe scripting (46) - firefox enable cross site scripting (46) - enable cross domain scripting (44) - iframe xss (43) - javascript iframe cross domain (43) - iframe crossdomain (43) - cross domain scripting (40) - allow cross domain scripting (40) - javascript iframe (39) - iframes cross domain (37) - XMLHttpRequest subdomain iframe (37) - javascript crossdomain (35) - REMOTE SCRIPTING WITH IFRAME (35) - scripting iframes (34) - cross domain iframe javascript (34) - cross domain scripting javascript (33) - remote scripting firefox (32) - IFrame remote scripting (32) - firefox allow cross site scripting (30) - XMLHTTPRequest crossdomain (29) - iframe remote (29) - ajax iframe cross domain (28) - remote script iframe (27) - iframe cross scripting (26) - iframe ajax cross domain (26) - javascript iframe domain (26) - javascript iframe firefox (26) - enable cross site scripting firefox (26) - cross site ajax iframe (26) - ajax cross site scripting (25) - iframe google maps crossite (24) - XMLHttpRequest bookmarklet (23) - ajax cross site (23) - firefox enable cross domain scripting (23) - iframe cross site scripting (23) - cross site scripting xmlhttprequest (23) - ajax crossdomain (22) - cross domain remote scripting (21) - cross site xmlhttprequest (21) - cross domain IFrame ajax (21) - javascript iframe cross site (19) - XMLHttpRequest cross site scripting (19) - cross domain scripting firefox (19) - iframe cross domain javascript (18) - xmlhttprequest cross (18) - iframe cross domain ajax (18) - crossdomain scripting (18) - jquery iframe parent (18) - iframe javascript cross domain (17) - iframes cross site (17) - remote iframe (17) - xmlhttprequest firefox (16) - cross domain ajax google maps (16) - remote scripting iframes (16) - google maps cross domain (15) - enable cross domain scripting firefox (15) - Firefox remote scripting (15) - javascript iframes firefox (15) - cross site javascript iframe (15) - enable iframes in firefox (15) - cross domain hack (15) - remote scripting cross domain (14) - javascript iframe scripting (14) - IFRAME cross domain xmlhttprequest (14) - how to allow cross site scripting (14) - iframe JavaScript restrictions (14) - iframe sandbox (14) - xss iframe (14) - iframe remote script (13) - iframe javascript (13) - Firefox iframe javascript (13) - how to enable cross site scripting (13) - javascript iframe remote (13) - crossdomain iframe (12) - scripting iframe (12) - ajax cross (12) - iframes (12) - cross domain ajax mozilla (12) - cross domain firefox (12) - iframe firefox (12) - javascript iframe Remote Scripting (12) - firefox enable cross domain (12) - allowing cross site scripting (12) - scripting firefox (11) - iframe javascript domain (11) - firefox iframe cross domain (11) - iframe cross domain security (11) - enable cross domain firefox (11) - cross site scripting enable (11) - F (11) - cross-domain IFRAME (11) - remote (10) - remote scripting (10) - remote scripting iframe javascript (10) - google xmlhttprequest cross domain (10) - ajax same origin (10) - AJAX iframes (10) - cross domain javascript frame (10) - firefox cross site scripting enable (10) - enable cross site scripting in firefox (10) - firefox cross frame scripting (10) - xmlhttprequest different domain (10) - cross site scripting allow (10) - jquery iframe cross domain (10) - cross iframe scripting (9) - iframes remote scripting (9) - hidden iframe remote scripting (9) - AJAX IFrames cross domain (9) - javascript iframe remote script (9) - firefox cross domain (9) - iframe same origin (9) - firefox enable remote scripting (9) - remote scripting hidden iframe (9) - cross site scripting and AJAX (9) - iframe crossdomain javascript (9) - enabling cross site scripting (9) - ajax cross domain mozilla (8) - xmlhttprequest remote domain (8) - firefox cross domain javascript (8) - ajax firefox (8) - enable cross scripting (8) - javascript cross domain post (8) -
[...] [2] Plan B: Remote Scripting With IFRAMEs [...]
Single pure javascript to extract information from a webpage at different domain is impossible!…
I tried to load some webpages via an iframe. I can load a arbitrary webpage into an iframe, but I can’t access any information from this iframe for security issues. Cross-domain information exchange seems to be impossible, if I don’t have s…
[...] » Plan B: Remote Scripting With IFRAMEs So Plan A was to use simple AJAX with XMLHTTPRequest. Plan B comes from this crazy suggestion at Apple’s developer site: Remote Scripting with IFRAME. It looks like different functions are subject to different restrictions, so the theory is that a JavaS (tags: maisonbisson.com 2007 cross_domain ajax) [...]
Any success in this arena? We’re implementing a proxy for our own work, but wish to offer JavaScript libraries for others to access our utilities.
I am also in a similar predicament - and I don’t know a good solution either…