I'm looking for an efficient way to control browsers cache for all links (CSS) and scripts in each page based on file (or module) version. I want every browser to look file's version first (in it's location), if it's still the same version, use cache but if it's version has been changed, reload the file.
If i use current file version (or it's module) as a query string in the end of file's location, browser (Specially Firefox) won't use cache for this file, even it's same as previous request and server return a 304 header. so it's impact loading performance.
for example:
<link rel="stylesheet" type="text/css" media="all" href="Modules/Footer/view/css/footer.css?version=1.01">
I don't want to change file's physically location based on it's version because file existed in a static location and it's version changed based on some update in it's module.
for example:
<link rel="stylesheet" type="text/css" media="all" href="Modules/Footer/1.01/view/css/footer.css">
to:
<link rel="stylesheet" type="text/css" media="all" href="Modules/Footer/1.02/view/css/footer.css">
It will worked but it's not what I'm looking for.