Edge does not play video if server returns 304

624 Views Asked by At

I've found that Edge doesn't work when playing videos for the 2nd time. My app is using a default <video> tag and Edge is sending an If-Modified-Since header when it loads the video for the second time. If my server returns a 304 Not-Modified it doesn't work. When I change it to return the complete video it works.

Anyone that can verify this behavior? Am I doing something wrong, should I add other things in my 304 response in order to make it work?

Btw I saw that other browsers like Chrome and Firefox never send the If-Modified-Since when loading the video.

1

There are 1 best solutions below

1
A. STEFANI On

You may take a look on this stackexchange question, where you can read:

According to this article, these are the situations browsers will request using If-Modified-Since:

  • The cached entry has no expiration date and the content is being accessed for the first time in a browser session
  • The cached entry has an expiration date but it has expired
  • The user has requested a page update by clicking the Refresh button or pressing F5

[...]

One thing that may help is adding "public" to the cache control header, i.e. Cache-Control: public, max-age=31536000.

You may also add immutable, so could you try with:

Cache-Control: public, max-age=31536000, immutable