Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to save multiple views for offline experience #165

Open
elyrko opened this issue Jul 6, 2023 · 0 comments
Open

Unable to save multiple views for offline experience #165

elyrko opened this issue Jul 6, 2023 · 0 comments

Comments

@elyrko
Copy link

elyrko commented Jul 6, 2023

Expected Behavior

I have multiple pages that need to be accssible without the internet, the problem i'm facing is that whenever i save multiple views the content gets overwritten with the latest one. This means no matter the url the content is the same. I need cache to output different content per url but it's not working for some reason.

I've tried setting different scopes but the only thing changing is the scope which the user can browse, the content still remains the latest thats been saved.

Both sw and main js are located at the root of my project

Here's my current implementation:
UpUp.start({ content: content+'<div class="flex justify-center bg-slate-500 h-full post-377 customize-support">'+container[0].outerHTML+'</div>', assets: [...new Set(assets)] });

The content is just an html container and assets are all the assets which are required for this page (js/css, images and an ajax request).

Looking at the developer console i can see that the cache gets deleted everytime a new one is saved, i also tried removing the deletion process but it still only displays the latest saved cache. even though after modification the deletion is not happening.

Is this a limit of SW/Upup.js or am i doing something wrong?

Your Environment

  • Version used: 6.2.2
  • Browser Name and version: chrome 114.0.5735.199
  • Operating System and version (desktop or mobile): windows 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant