Question about using gatsby-plugin-offline to generate pages in JavaScript instead of HTML #38447
Unanswered
shahidakhter786
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
Background:
I'm currently using Gatsby for a project and have been exploring the capabilities of the gatsby-plugin-offline. I've noticed that the plugin handles caching of pages and assets for offline access, which is fantastic. However, I'm interested in a specific scenario where I'd like to generate pages in JavaScript instead of HTML. I believe this could potentially offer certain advantages for my use case.
Question:
Is it possible to configure or customize gatsby-plugin-offline in a way that it generates pages in JavaScript format instead of HTML? This way, the cached pages could be served as JavaScript files. I'm interested in doing this to leverage certain benefits/firewall restrictions for html content related to dynamic content and performance.
Use Case:
One potential use case for this scenario is due to firewall restrictions for html content & having more dynamic content on cached pages. Since JavaScript can interact with APIs and fetch data dynamically, serving cached pages as JavaScript files might allow for real-time updates without requiring full re-rendering.
Expected Outcome:
I'm hoping to understand if gatsby-plugin-offline can be configured or extended to achieve this goal. If so, I'd greatly appreciate guidance on how to implement it effectively, including any considerations or best practices to ensure the security and performance of the generated JavaScript pages.
reference link: https://www.site.com/offline-plugin-app-shell-fallback/index.html?__WB_REVISION__=dfjksdhsdjdfhjkfhkjfhsfhjs
Beta Was this translation helpful? Give feedback.
All reactions