Giter Site home page Giter Site logo

demo-offline's Introduction

注意

  • 服务器绝对不能缓存sw.js文件, 否则无法升级, Cache-control: no-store
  • sw.js需要放在根目录下, 如果放在/abc/sw.js,那么只能收到/abc/路径下的fetch事件(例如: /abc/page1/, /abc/page2/)
  • 需要https, localhost和127.0.0.1可以使用
  • 无法操作DOM, 可以通过postMessage发送消息
  • 升级后需要关闭所有页签才会生效

其它

  • from memory cache 或者 from disk cache, DevTools --> Network --> Disable cache

demo-offline's People

Contributors

adntin avatar

Stargazers

 avatar  avatar

Watchers

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.