ccapndave / cordova-plugin-service-worker Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mobilechromeapps/cordova-plugin-service-worker
This project forked from mobilechromeapps/cordova-plugin-service-worker
I am currently adding the required functions to the main window
using the code at https://github.com/ccapndave/cordova-plugin-service-worker/blob/master/src/ios/CDVServiceWorker.m#L135-L137
Unfortunately this means that if the webpage is refreshed these functions are no longer in the context. I think that instead of doing this in initializePlugin
I instead need to use a UIWebViewDelegate
and do it in webViewDidFinishLoad
, but this is a lot more complicated than it sounds (I think because there is already a delegate on the UIWebView
.
Hey there,
I figured I'd post this here since the original plugin hasn't been updated in quite some time. Instead of relying on a local www/index.html
file, my Cordova app loads remote content from a url like:
<content src="https://foobar.com/index.html" />
After adding a local www/sw.js
file and the plugin, it appears that the event listener for fetch
is only detecting requests for data that my other plugins are requesting. For example, the Facebook SDK makes a bunch of requests to their servers which are detected, but the listener isn't detecting any requests to foobar.com/index.html
and other assets. My guess is that this is because they're from a different origin, but my understanding of Service Workers isn't that great.
If you have any quick thoughts on how to handle this, I'd definitely appreciate your input!
If you put a request to the cache, and then put another request with the same URL it creates a new entry in the database instead of overwriting the existing one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.