[thelist] XML and Javascript: 2 questions
Peter-Paul Koch
pp.koch at gmail.com
Fri Oct 1 09:13:09 CDT 2004
> > This took me a while, but the answer seems to be No. I wrote a simple
> > XMLHTTPrequest script and tried to load a file from another server:
> > not allowed (Moz and IE).
> >
> > So for the moment it seems XMLHTTPrequests are limited to what you can
> > get from your own server. If anyone can confirm or deny I'd be most
> > happy.
>
> XMLHttpRequest is affected by the same "same origin policy" as
> anything else in JavaScript. Saf1.2, op7.6 and moz implementations are
> all limited by it. The ie6w XMLHTTP object is also limited by it,
Yes, that seems to be true, even though it's not a security hazard.
After all you are allowed to load a page from another server in one of
your frames, which is an analogous case.
Another oddity is that importing XML through
document.implementation.createDocument or MS.XMLDOM *does* allow the
loading of data from another server, even though reading the data
isn't allowed.
I'd hoped to write a simple script to import and display RSS data from
a few choice sources, but that seems to be out of the question.
> though ie5.5w allows cross domain access.
Not on my machine (though I have multiple IE's installed, which could matter).
--
-------------------------------------------------------------------
ppk, freelance web developer
Interactie, copywriting, JavaScript, integratie
http://www.quirksmode.org/
------------------------------------------------------------------
More information about the thelist
mailing list