We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Service workers : disable caching (nginx + apache) Topic is solved
Service workers : disable caching (nginx + apache)
Service workers enable web developers to create an application cache.
A kind of local cache that is check before a request is sent to the server.
So with service workers it is possible to make a web application offline available.
(It is being pushed rather fanatically by Chrome (Google).)
Service workers are controlled by a javascript file.
By putting a version number in the javascript file, the browser knows when to update the cache.
BUT, if the javascript file is cached... then the new version number is not renewed (because the file is also cached in the disk cache).
So caching should be off for service worker javascript files, but there is no significant difference between ordinairy javascript files and service worker javascript files.
My web server is apache+nginx and I will name all my service worker files "sw.js".
Can I change the nginx configuration to disable caching on all files with the name "sw.js" ?
Alternatively :
I can place service worker javascript files in a directory called "sw" and all files in that directory should have "disable cache headers" .
(Note : I know how to disable caching for 1 specific file in 1 specific location ... My question is how to disable all caches for each file named "sw.js")
A kind of local cache that is check before a request is sent to the server.
So with service workers it is possible to make a web application offline available.
(It is being pushed rather fanatically by Chrome (Google).)
Service workers are controlled by a javascript file.
By putting a version number in the javascript file, the browser knows when to update the cache.
BUT, if the javascript file is cached... then the new version number is not renewed (because the file is also cached in the disk cache).
So caching should be off for service worker javascript files, but there is no significant difference between ordinairy javascript files and service worker javascript files.
My web server is apache+nginx and I will name all my service worker files "sw.js".
Can I change the nginx configuration to disable caching on all files with the name "sw.js" ?
Alternatively :
I can place service worker javascript files in a directory called "sw" and all files in that directory should have "disable cache headers" .
(Note : I know how to disable caching for 1 specific file in 1 specific location ... My question is how to disable all caches for each file named "sw.js")
Re: Service workers : disable caching (nginx + apache)
Update
After some searching I found one option :
1. disable in the proxy extensions the js-files
2. disable the caching of javascript files in the .htaccess file
3. in the service worker create an application cache for all other js files.
After some searching I found one option :
1. disable in the proxy extensions the js-files
2. disable the caching of javascript files in the .htaccess file
3. in the service worker create an application cache for all other js files.