Add cache busting feature to an existing PHP website

Job ID: 37986492

Budget: $15 – $25 USD

I am looking to add a cache busting feature to a website. I am receptive to paying for milestones or paying hourly if we end up communicating a lot while the work is done.

The PHP site consists mostly of 1 mostly HTML page with a long list of links to a directory full of PDF and MP4 files. Sample code is attached. Each can be opened in a Fancybox Modal window. Sometimes the PDF/MP4 files are overwritten with a newer version with the same exact name. Of course browsers often use the cached version instead. The files are big enough where I want the browser to cache them, but only until they change - then the browser needs to grab the new version from the server.

The apache and .htaccess expire headers haven't done what I need. I read that some codebases exist that will assign a variable to the end of the URL based on a file hash. I thought this may be the way to go.

The solution needs to be editable by me. I am more of a general IT person who can do some front end development and tweak some code. So markup and explanations are important or available documentation if we cab use a simple library.

A follow up project might be to implement squid or some sort of automatic way of localizing those pdf and mp4 assets on web kiosks at a live event with slow bandwidth - so that response time is immediate.

Attached is a sample of the HTML portion of the links themselves. There are 100s on the page.