Oliver Nassar

I can be reached at onassar@gmail.com.

For my open source work, check out github.com/onassar


Internet Explorer 11 and CORS crossOrigin Support

View more posts

I'm working on a project with Filepicker that makes use of CORS to manipulate images hosted on other servers within a canvas element. I found out that IE didn't support the CORS for Image objects (using the crossOrigin property), so I created a proxy to handle IE.

The way I was testing for support was by sniffing out the feature, like so:

if (('crossOrigin' in (new Image())) === true) {
    …
}

I was pleasantly suprised (but just for a minute) when IE11 seemed to support this. As you can see from the documentation, Microsoft states that it does support it.

Unfortunately, it doesn't work as expected. I still receive 5022 SecurityError's when trying to access an image from a third party server.

Well, truthfully, I only get that error when I don't :/
Sometimes it works, sometimes it doesn't. I'm not sure why, but have a feeling it may be related to a caching thing. Either way, it seems IE11 doesn't support crossOrigin on Image objects properly/fully yet, and I'll have to continue to resort to an image proxy for it.

Hope this helps someone else.