whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: limit sw caching to navigation requests
Date Mon, 06 Nov 2017 14:48:57 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new a401b7f  limit sw caching to navigation requests
a401b7f is described below

commit a401b7f0c68db338f8267ce088c328db08375142
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Nov 6 09:48:20 2017 -0500

    limit sw caching to navigation requests
---
 www/board/agenda/views/sw.js.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/board/agenda/views/sw.js.rb b/www/board/agenda/views/sw.js.rb
index e842314..d16f780 100644
--- a/www/board/agenda/views/sw.js.rb
+++ b/www/board/agenda/views/sw.js.rb
@@ -28,6 +28,7 @@ self.addEventListener :fetch do |event|
   url = url.slice(scope.length) if url.start_with? scope
 
   if url =~ %r{^\d\d\d\d-\d\d-\d\d/[-\w]*$} and event.request.method == 'GET'
+    return unless event.request.mode == 'navigate'
     return if url.end_with? '/bootstrap.html'
 
     event.respondWith(

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message