3 ms·
Wouldn't that be blocked by cross-site AJAX restrictions? Or are we talking about injecting <img> and <script> tags into the document?
by kijin 15y ago
Wouldn't that be blocked by cross-site AJAX restrictions? Or are we talking about injecting <img> and <script> tags into the document?
- caf 15y agoThe latter, or maybe iframes.
- scotth 15y agoNo, it wouldn't. With AJAX, the request always goes out, and is received and processed by the server if they choose to (most never check the request origin). Then, the server can decide whether or not to attach cross origin resource sharing headers to the response. If those headers exist, the response is exposed to JavaScript. If not, they are swallowed by the browser.