kandi X-RAY | photo-log Summary
kandi X-RAY | photo-log Summary
photo-log
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of photo-log
photo-log Key Features
photo-log Examples and Code Snippets
Community Discussions
Trending Discussions on photo-log
QUESTION
I have built PWA enabled SPA by using Vue, js, node technology. Problem is that service worker deletes my stored cache for viewing app offline whenever i switch off my PC, otherwise it works. Second problem is that it refuses to fetch data that includes google fonts, unless I enable CORS in the browser. Since PWA is based on the browser and users will not have CORS add-on installed in the browser, is there some way to enable CORS on the (Windows) server? Thanks in advance, here is my service worker code.
...ANSWER
Answered 2020-Mar-20 at 11:21Seems like the issue is with the activate
event handler in the service worker. This is mainly using for removing the old cache from the browser. Try replacing the event listener with the following code
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install photo-log
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page