Peter-Paul Koch (who now blogs on quirksmode) discusses XMLHTTPRequest in a entry. He points out that you can do something similar with a hidden iframe element. However:
- The
iframemethod doesn’t support asynchronous fetches. - You can only use
GET. - You don’t get access to the status headers, nor can you send additional headers with your request.
- You’re not restricted to talking to the same host as the original page (yes, that’s a security feature.)
iframewas removed from XHTML 1.0 strict.
Angus Turnbull built a version of the iframe method.
Meanwhile, [via Anne van Kesteren], Petrik de Heus built a demo using XMLHTTPRequest to load an Atom feed and transform it in place.
Possibly Related posts (machine generated):