Recognize HTTP 304 in service worker / fetch()
问题 I build a service worker which always responds with data from the cache and then, in the background, sends a request to the server. If the server responds with HTTP 304 - not modified everything is fine, if the server responds with HTTP 200 , that means the data was changed and the new file is put into the cache, also the user is notified and asked for a page refresh. I use the not-modified-since / last-modified headers to make sure the client gets the most up-to-date version. When a request