Hello, all! I am writing a small web app that consists solely of static html/javascript in the frontend and mod_perl in the backend which serves up JSON responses for the frontend. I need to ensure that when the static html and javascript files are updated, the user immediately receives fresh copies of the files. Using old javascript code at the same time as new backend code can damage the data. How should I handle this? I need to make sure the browser downloads all files anew every time the modified time on the disk changes, but I will never know what time that is, as this app will be deployed on multiple servers on multiple networks, and updates will be up to the admin of the system.
I have done some research on mod_expires, but it seems this would only affect the expiration date of the resource in the browser's cache and must be set *ahead* of the request at which I need the browser to update its cache, which of course isn't possible in my application.
Is Last-Modified the answer? Do most/all browsers respect this and refresh their cache if Last-Modified changes? If so, how can I cause Apache to send this header? It is not sending the header now.