Coder Social home page Coder Social logo

serviceworker's Introduction

ServiceWorker Design

What's Going On Here?

ServiceWorkers (formerly Navigation Controllers) are a new system in browsers that provide event-driven scripts that run independent of web pages. They are similar to SharedWorkers except that their lifetime is different and they have access to domain-wide events such as network fetches.

ServiceWorkers also have scriptable caches. Along with the ability to respond to network requests from certain web pages via script, this provides a way for applications to "go offline".

ServiceWorkers aren't a new version of the rightfully-loathed HTML5 Application Cache. Instead, they are comprised of scriptable primitives that make it possible for application developers to build URL-friendly, always-available applications in a sane and layered way.

To understand the design and how you might build apps with ServiceWorkers, see the explainer document.

For the nitty-gritty of the API, see service_worker.ts, a TypeScript description of the major bits of the callable interface.

Building & Contributing to the Design

Most decisions regarding the API and finer points of the design are handled through issues in this repository. Feel free to open one if you don't see an obvious answer to your question in the Explainer.

To make edits to the design, change the TypeScript file (service_worker.ts); the JavaScript file is built from it. Building the JS version yourself isn't essential, but here's how:

Requirements:

Installing dependencies:

# From the root of the project directory
npm install

Building:

# From the root of the project directory
make

serviceworker's People

Contributors

slightlyoff avatar jakearchibald avatar alecf avatar annevk avatar anssiko avatar michaelsanford avatar dontcallmedom avatar fremycompany avatar izuzak avatar jungkees avatar shwetank avatar sole avatar

Watchers

JT5D avatar James Cloos avatar  avatar

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.