Giter Club home page Giter Club logo

cordova-plugin-service-worker's People

Contributors

agrieve avatar ccapndave avatar clelland avatar hgenru avatar imintz avatar jamessharp avatar mmocny avatar mwoghiren avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

app4site

cordova-plugin-service-worker's Issues

Functions added to the JSContext are lost when the page is refreshed

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.

Fetch events for remote content url

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!

Cache puts do not overwrite each other

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.