Mobile app version of topseosmo.com
Login or Join
Candy875

 query : Uploading New Version Of Media Files Are Still Cached In Browser Sorry if this is the wrong venue. I upload new media files to web site (MP3 or OGG). Visitors clear their cache and refresh

@Candy875

Posted in: #CacheControl #Media

Sorry if this is the wrong venue.

I upload new media files to web site (MP3 or OGG). Visitors clear their cache and refresh their browser. However, the -old- version of the file still plays for them. I can go so far as to delete the file from the web server via FileZilla and they -still- can load and play the old version.

When I look at the .htaccess file for the site I don't see any cache statements.

This doesn't seem to be an issue with new HTML, however. IOW: if I update a PHP or HTML or JS page, the results do show immediately.

The host is GoDaddy. I don't believe they have any caching services (that I can see anyhoo) like CloudFlare. Or perhaps they do and I can't 'see' it.

My question is -why-? And more to the point, -how- can I 'flush' whatever needs to be flushed so that when I upload a new audio/video file the new file is immediately made available.

10.01% popularity Vote Up Vote Down


Report

Login to follow query

More posts by @Candy875

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

The dificulty here is the networks with which the users are accessing your site. It used to be that business networks mainly cached the static content but now internet service providers are doing the same to improve speeds for their customers as well as decreasing upstream bandwidth on the peering connections. The easiest way to fix this is to do what is called cache busting which deals with all major types of caching including ISP caching, LAN caching, and browser caching. What you do is add a variable query string to the end of the file such as...

domain.com/static-file.oog?v=12345

and vary that query string each time the file is updated. While the query string will make no difference to the file itself as the query string will be ignored as having no relevance to the file in question caches will see it as a new URL and so will make the request from your server instead of from the cache in question.

As a side note this is how most of the major networks such as Facebook and Google themselves also break caches for when they push updated static content.

10% popularity Vote Up Vote Down


Report

Back to top | Use Dark Theme