The crossorigin attribute of HTMLImageElement is hard to use correctly because image responses are often cached. For example, consider the case where the server always response with the following header: Access-Control-Allow-Origin: * If we request the image first without the crossorigin attribute, then we'll send credentials and cache the response in the MemoryCache. Later, if we request the image with the crossorigin attribute, we'll grab the response out of the MemoryCache, but the CORS check will fail because we'll remember that we sent credentials the first time. This behavior can be frustrating for web developers who don't understand why the second request isn't allowed. After all, they said their image was allowed by *. One possible solution to this problem is to examine the allowCredentials flag when deciding whether the resource in the MemoryCache is appropriate for the given request. The CachedResourceLoader and CachedResource have a bunch of logic for deciding whether an existing CachedResource is valid for a new request or whether we should evict it and request the resource again. We could try fixing this issue by including logic to compare the allowCredentials flag in this code path.
Looking into this.
Created attachment 101779 [details] Patch
Comment on attachment 101779 [details] Patch Look great. Thanks!
Comment on attachment 101779 [details] Patch Clearing flags on attachment: 101779 Committed r91626: <http://trac.webkit.org/changeset/91626>
All reviewed patches have been landed. Closing bug.