Skip to content Skip to sidebar Skip to footer

Force Browser To Update Cached HTML5 Video Object

Is there a way to force a web browser, i.e. Firefox or Firefox Mobile (latest versions) to update a HTML5 video object when the page reloads? I am using CTRL+R, reload button, and

Solution 1:

Yes. Append a random param to the url, usually a timestamp. Essentially, the param does nothing, but this makes the browser think the url is different, and will force itself to load the resource

http://yoursite.com/path/to/resource.mp4?t=1923801924

For your approach, however, you'll need JS to set the video's source instead of relying on the same exact value on every reload.


Post a Comment for "Force Browser To Update Cached HTML5 Video Object"