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

Closed
wants to merge 29 commits into 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 <[email protected]>
@serhalp
Copy link
Contributor

serhalp commented Oct 29, 2024

@emmron This PR is very large and unwieldy, updates unrelated code, and it isn't clear to me what it's solving. To be honest it looks like it may even have been AI generated, and it looks very similar to #39050. I'm going to close it, but please feel free to open smaller, more easily reviewable PRs.

@serhalp serhalp closed this Oct 29, 2024
@serhalp serhalp mentioned this pull request Oct 29, 2024
@emmron emmron deleted the gatsby-offline-plugin branch November 3, 2024 10:29
@emmron emmron restored the gatsby-offline-plugin branch November 3, 2024 10:29
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.

2 participants