Added some time based cache bursting

This commit is contained in:
Martin Donnelly 2018-10-19 00:24:28 +01:00
parent 54da46e8bf
commit 85598fda97

View File

@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
const CACHE_VERSION = { 'version': '0.0.906' }; const CACHE_VERSION = { 'version': '0.0.907' };
const PRECACHE = `jubileeData-${CACHE_VERSION.version}`; const PRECACHE = `jubileeData-${CACHE_VERSION.version}`;
const RUNTIME = 'runtime'; const RUNTIME = 'runtime';
@ -124,7 +124,7 @@ self.addEventListener('fetch', event => {
); );
}*/ }*/
/*if (event.request.url.startsWith(self.location.origin)) { if (event.request.url.startsWith(self.location.origin)) {
console.log('One of our requests..'); console.log('One of our requests..');
@ -141,7 +141,7 @@ self.addEventListener('fetch', event => {
}); });
}) })
); );
}*/ }
if (event.request.url.startsWith('https://maps.googleapis.com')) { if (event.request.url.startsWith('https://maps.googleapis.com')) {
const url = new URL(event.request.url); const url = new URL(event.request.url);