[webkit-dev] Issue regarding Same Origin check with Blobs and XMLHttpRequest
abarth at webkit.org
Thu May 10 10:30:54 PDT 2012
[webkit-dev -> bcc]
What URL are you trying to load? The error message doesn't say. I
wonder if you're trying to load a relative URL, which is trying to be
resolved relative to the blob URL. It might work better with an
On Thu, May 10, 2012 at 1:32 AM, Vishal Shah <vishal at sokrati.com> wrote:
> I have implemented a web worker that handles XMLHttpRequest object for my
> When I create a separate *.js file for the worker's script it works
> perfectly fine.
> However, when trying to instantiate the worker using a Blob, Chrome throws
> an error as follows:
> XMLHttpRequest cannot load . Cross origin requests are only supported for
> The URL of the blob is
> "blob:http%3A//localhost%3A8080/047cca65-b588-4077-a81d-84e772dde20d" which
> when decoded is
> And my application is also running at localhost:8080
> I think somehow the same origin check is failing for the blob.
> Following is the code snippet I am trying to implement:
> var blobBuilder, blobBuilderClass, blobURL, urlClass, worker;
> blobBuilderClass = wObj.BlobBuilder || wObj.WebKitBlobBuilder ||
> urlClass = wObj.URL || wObj.webkitURL;
> blobBuilder = new blobBuilderClass();
> blobBuilder.append(workerFunction.toString() +
> blobURL = urlClass.createObjectURL(blobBuilder.getBlob());
> worker = new Worker(blobURL);
> Am I doing anything wrong here or is it a known bug in Chrome?
> Please suggest. References to any related article will be helpful.
> If this is not the correct list to be contacted, please suggest me the
> correct one.
> Thanks and Regards,
> Vishal Shah
> Sokrati Inc.
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
More information about the webkit-dev