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

Service workers #21

Closed
Crecket opened this issue May 1, 2018 · 4 comments · Fixed by #22
Closed

Service workers #21

Crecket opened this issue May 1, 2018 · 4 comments · Fixed by #22
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Crecket
Copy link
Contributor

Crecket commented May 1, 2018

I was thinking it'd be nice to add a service worker to the new documentation page which could significantly speed up the loading time for the new documentation. And since the service worker works in the background it wouldn't require some kind of rewrite in the theme/template that is currently used.

If you want I can create a pull request to set this up using something like sw-precahe which is Google's library to easily create a service worker script.

The trade-off then becomes that new versions of the documentation won't be visible instantly since a cached version will be shown first but you would have sub 1 second/near instant load times

@OGKevin
Copy link
Contributor

OGKevin commented May 1, 2018

Interesting 🤔 This could be fixed if the maintainers of Redoc implements lazy rendering in their module. Redocly/redoc#475. This will solve the long loading time.

I'm not familiar with the suggestion you've given so I would indeed ask you to create a PR. I want to know first how much time you think this will take. So we can plan if we want to give the maintainers of Redoc some time to implement lazy rendering in their project or we want to solve it with your suggestion.

@Crecket
Copy link
Contributor Author

Crecket commented May 1, 2018

Lazy loading is definitely the best solution 👍

Setting up a proper service worker will probably take an hour to set it up and test if everything is loaded/cached correctly. Especially if you use the sw-precache/sw-toolbox projects from Google which are just simple scripts which you can run to generate it

@OGKevin
Copy link
Contributor

OGKevin commented May 2, 2018

@Crecket if thats the case then i would say goahead and create a PR. Ill discuss this internally as well to doublecheck if this is compliant but i have a feeling it is :)

@OGKevin OGKevin modified the milestones: 0.3.5, 0.4.0 May 2, 2018
@OGKevin OGKevin added the enhancement New feature or request label May 2, 2018
@OGKevin
Copy link
Contributor

OGKevin commented May 2, 2018

@Crecket BTW, please follow this contribution guide

Crecket added a commit to Crecket/doc that referenced this issue May 2, 2018
OGKevin added a commit that referenced this issue May 2, 2018
Added service worker, generation files and dependencies (#21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants