50 Experience
0 Lessons Completed
0 Questions Solved


Posted in Service worker view patch does not working in cached

I want to add a view file inside cached but it doesn't work.
How to call view Patch in cache?
ar CACHE_VERSION = 'v1';
var CACHE_NAME = CACHE_VERSION + ':sw-cache-';

function onInstall(event) {
console.log('[Serviceworker]', "Installing!", event);
caches.open(CACHE_NAME).then(function prefill(cache) {
return cache.addAll([

    // make sure serviceworker.js is not required by application.js
    // if you want to reference application.js from here
    '<%#= asset_path "application.js" %>',

    '<%= asset_path "application.css" %>',

            **'/views/user/index.haml' ** //Uncaught (in promise) TypeError: Request failed



Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2023 GoRails, LLC. All rights reserved.