I have a web system using Ajax which is constantly updated. I need to implement a way to update the user cache of .js and .css files when these files are modified.
I tried to solve it in two ways. The first is the use of url with variable to call these files forcing the browser to always fetch resources and not use the cache, but this way the system was slow because it did not count the benefits of caching.
The other way was with the manifest html5 cache with scripts to dynamically create the manifest. But as the system has constant image upload, every time an image is up, the manifest is upgraded to a new version, forcing users to cache all files.
Is there a way to use the cache as it usually works, but when there is a change of .js and .css files, is the browser informed of the files to be refreshed in the cache, from a version control? Does anyone know of an approach that works like this?