Skip to content
Advertisement

Tag: xmlhttprequest

Why does my http://localhost CORS origin not work?

I am stuck with this CORS problem, even though I set the server (nginx/node.js) with the appropriate headers. I can see in Chrome Network pane -> Response Headers: which should do the trick. Here’s the code that I now use to test: I get XMLHttpRequest cannot load http://stackoverflow.com/. Origin http://localhost is not allowed by Access-Control-Allow-Origin. I suspect it’s a problem

Cross-Origin XMLHttpRequest in chrome extensions

According to chrome extensions API cross-origin calls using XMLHttpRequest object should be allowed if permissions are set: An extension can talk to remote servers outside of its origin, as long as it first requests cross-origin permissions. I am closely following the Google tutorial, but the code below is giving me an error message: XMLHttpRequest cannot load http://www.google.com/search?hl=en&q=ajax. Origin chrome-extension://bmehmboknpnjgjbmiaoidkkjfcgiimbo is

Upload file with Ajax XMLHttpRequest

I am trying to send file with XMLHttpRequest with this code. I get this error: T The request was rejected because no multipart boundary was found. What am I doing wrong? Answer There is no such thing as xhr.file = file;; the file object is not supposed to be attached this way. xhr.send(file) doesn’t send the file. You have to

Advertisement