Browser caching behavior is controlled by certain headers in the HTTP response that this element conveys.
So, in order to change the caching behavior of your visitors' browsers, you need to configure the server to deliver certain HTTP headers along with MP4 when it is requested.
You have several options for using headers. Common are Expires or Cache-Control max-age, Etag and Last-Modified. I will not explain them in detail - there are many articles that do this, but Etag and Last-Modified are more complex, but let the visitor’s browser detect when your video has changed, and Maxess and Expires and Cache-Control are time-based.
Of all this, I recommend Expires. It has been the longest in HTTP (since 1.0), and it is the simplest.
Example:
Expires: Fri, 08 Jan 2020 02:32:53 GMT
However, if you expect your video to someday change, and you do not want to use a different file name to ensure that a new video appears, then using ETag or Last-Modified may be appropriate.
source share