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: handle cached collections urls properly #140

Merged
merged 2 commits into from
Apr 22, 2023

Conversation

userquin
Copy link
Member

This PR includes some sw optimizations:

  • map local iconify collections using sw precache manifest revision entry: current version will end with duplicates entries, for SW precache and for local request without the ?__WB_REVISION__=<revision> entry
  • adds some response header to avoid CORS errors: this can be only tested on production, maybe we can enable PR preview

I'll try to move all local collections outside precache on its own cache using runtime config, current version will take long time to install and activate the sw, it needs to download ~400MB, then it is activated: visit any collection without sw installed and activated will use iconify request api.

This PR will be on draft a few minutes, checking on my local runtime caching changes.

@userquin
Copy link
Member Author

I will clear logs later...

@userquin
Copy link
Member Author

some screenshots:

imagen

imagen

@userquin userquin marked this pull request as ready for review April 22, 2023 13:27
@userquin
Copy link
Member Author

Runtime caching approach not working, getting errors when accessing the cache, there is no way to update cache entry. Precaching collections working properly, tested also on safari and chrome on macOS (cyberalien).

@antfu antfu merged commit 3678e38 into main Apr 22, 2023
3 checks passed
@antfu antfu deleted the userquin/fix-sw-iconify-api-response-headers branch April 22, 2023 16:18
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.

None yet

2 participants