diff --git a/app/views/service_worker/index.js.erb b/app/views/service_worker/index.js.erb index d6940167f..31541e913 100644 --- a/app/views/service_worker/index.js.erb +++ b/app/views/service_worker/index.js.erb @@ -1,6 +1,6 @@ // Serviceworkers file. This code gets installed in users browsers and runs code before the request is made. <% unless Rails.env.test? || ENV["SKIP_SERVICEWORKERS"] == "true" %> - const staticCacheName = 'static-1.2'; + const staticCacheName = 'static-1.3'; const expectedCaches = [ staticCacheName ]; @@ -18,8 +18,8 @@ "/shell_top", // head, top bar, inline styles "/shell_bottom", // footer "/async_info/shell_version", // For comparing changes in the shell. Should be incremented with style changes. - "/404", // Not found page - "/500", // Error page + "/not_found.html", // 404 etc. + "/error.html", // 500 etc. "/offline.html" // Offline page ])) ); @@ -54,10 +54,10 @@ const endFetch = Promise.resolve(cachedShellBottom); const middleFetch = fetch(url).then(response => { if (!response.ok && response.status === 404) { - return caches.match('/404'); + return caches.match('/not_found.html'); } if (!response.ok && response.status != 404) { - return caches.match('/500'); + return caches.match('/error.html'); } return response; }).catch(err => caches.match('/offline.html')); diff --git a/public/error.html b/public/error.html new file mode 100644 index 000000000..2b8924854 --- /dev/null +++ b/public/error.html @@ -0,0 +1,81 @@ + + +
+
+
+ Our team has been notified.
+
+ We apologize for any inconvenience.
+