Forum Discussion

Bill_Nye's avatar
Bill_Nye
Copper Contributor
Jul 08, 2023

Edge Bug - Audio() HTTP Response Lacking CORS Headers Is Cached, Causing Subsequent fetch() To Fail

Title describes it. Essentially what is happening is that when using the Audio() constructor Edge does not set the Origin header in the request, which causes the server to not send any Access-Control-... CORS headers. The audio plays fine here. Unfortunately, the browser caches this response (even though it doesn't have CORS headers), which causes a subsequent fetch() to the same url afterwards to fail because the fetch expects CORS headers on the response but the cached one doesn't have them.

 

Only noticed this because it works fine in Chrome. The reason is that Chrome doesn't set "If-None-Match" for the fetch(), it just ignores the cache. Edge uses this cache header here and that causes this behavior.

 

Edge version -  Version 114.0.1823.67 (Official build) (64-bit)

No RepliesBe the first to reply

Resources