10

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.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Andre
  • 1,740
  • 2
  • 13
  • 15
  • At first glance this seems like a caching bug in Edge. With most servers it should be pretty easy to modify them to ignore the header on certain resources - so that can serve as a workaround if the video is not cacheable (i.e. too large). – nneonneo Mar 21 '18 at 20:11
  • Is the video streamed over https? Can you try over http as well if so to see if there is any difference? – Alex KeySmith Mar 22 '18 at 14:47
  • @nneonneo that is what I eventually did - disable caching for edge – Andre Mar 24 '18 at 16:17
  • @AlexKeySmith it is over http have not been using https (yet) – Andre Mar 24 '18 at 16:18

1 Answers1

4

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
A. STEFANI
  • 6,707
  • 1
  • 23
  • 48