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

Fix: Gatsby-Plugin-Offline Double Reload Issue #39042

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

emmron
Copy link

@emmron emmron commented Jul 13, 2024

Issue: The Gatsby-Plugin-Offline requires two reloads to properly cache and serve the index page, causing a blank screen on the second reload.

Solution:

1.	Updated service worker logic to cache the index page and component-src files on the first load.
2.	Ensured service worker correctly responds to requests with cached resources.

Documentation:

•	Updated caching logic documentation in the plugin’s README.

Tests

•	Added unit tests to verify the correct caching of index and component-src files.
•	Performed manual tests to confirm the offline experience works without requiring double reloads.

Related Issues

•	Fixes #39041

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 13, 2024
@emmron
Copy link
Author

emmron commented Jul 13, 2024

@jhanstra #39041 #39042
/
Duplicate of #

emmron added 27 commits July 22, 2024 20:37
…pplied to URLs in manifest.webmanifest and HTML head.
…pplied to URLs in manifest.webmanifest and HTML head.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…est.webmanifest and HTML head. Ensured correct path handling and resolved linting issues by updating string literals and formatting.
…est.webmanifest and HTML head. Ensured correct path handling and resolved linting issues by updating string literals and formatting.
…est.webmanifest and HTML head. Ensured correct path handling and resolved linting issues by updating string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…correctly applied to URLs in manifest.webmanifest and HTML head. Also, address linting issues by correcting string literals and formatting.
…first reload" --body "This PR addresses issue gatsbyjs#39041 by ensuring that gatsby-plugin-offline provides an offline experience on the first reload without requiring a second reload.

Signed-off-by: Emmett Hoolahan <emmetthoolahan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant