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

feat: add pwa.cache.* option to precisely control caching #1501

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

cotes2020
Copy link
Owner

@cotes2020 cotes2020 commented Jan 21, 2024

Type of change

  • New feature (non-breaking change which adds functionality)
  • Improvement (refactoring and improving code)

Description

Expanded several options for setting the pwa cache in the configuration file _config.yml:

  1. Added option pwa.cache.deny_paths to remove unnecessary cached content from PWA.

    When a user has one or more sub-sites (delimited by baseurl) under a domain, then the PWA needs to recognize the URL of the external site to avoid caching invalid resources.

    Specific scenarios discussed in detail in #1424.

  2. Support to delete PWA cache on user's browser. (Set pwa.cache.enabled to false)

  3. Website can remove PWA features, including installation. (Set pwa.enabled to false)

  4. app.js / sw.js is hard to maintain when mixed with liquid, so refactor to pure JS and manage by rollup.

Additional context

@cotes2020 cotes2020 force-pushed the feature/#1454-pwa-exclude-path branch 5 times, most recently from bec37f1 to 589da18 Compare January 25, 2024 22:00
@cotes2020 cotes2020 force-pushed the feature/#1454-pwa-exclude-path branch from 589da18 to 3b74123 Compare January 26, 2024 15:29
@cotes2020 cotes2020 changed the title feat: add option to specify paths to skip PWA cache feat: add pwa.cache.* option to precisely control caching Jan 26, 2024
@cotes2020 cotes2020 merged commit 1127c43 into master Jan 27, 2024
11 checks passed
@cotes2020 cotes2020 deleted the feature/#1454-pwa-exclude-path branch January 27, 2024 18:22
@Owslebury
Copy link

Legend

Rootjhon added a commit to Rootjhon/rootjhon.github.io that referenced this pull request Jan 29, 2024
peteryuhang added a commit to peteryuhang/peteryuhang.github.io that referenced this pull request Jan 31, 2024
@cotes2020 cotes2020 mentioned this pull request May 11, 2024
1 task
gudtldn pushed a commit to gudtldn/gudtldn.github.io that referenced this pull request Jul 26, 2024
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

Successfully merging this pull request may close these issues.

Specify the exclude path for the PWA through configuration
2 participants