GithubHelp home page GithubHelp logo

Comments (7)

NekR avatar NekR commented on July 20, 2024

@pavankumarkatakam You are right, it's a bad thing. Unfortunately, currently there is no right way to deal with it, but I am currently working on a next version (v3 branch, not usable yet) where will be implemented automatic cache busting.

from offline-plugin.

NekR avatar NekR commented on July 20, 2024

Okay, I just pushed an update to v3 branch. It's still unstable, but now you can try it (do not use changed update strategy yet).

First of all, it now automatically adds cache-bust params to all requests. It looks like this http://localhost:8080/?__uncache=v3_2016-03-20%2011%3A13%3A05 and depends on what updateStrategy you are using.

Seconds is that SW is now always uses ignoreSearch mode, so you do not have to have same request params in HTML and inside SW. So if your requests in HTML looks like this main.js?78787827878 it must be fine and they will catch latest version from SW anyway.

Also, you can try to play with rewrites option to rewrite names of your assets to main.js?78787827878, but as I said there is no way to disabled built-in cache-busting params passing.

from offline-plugin.

NekR avatar NekR commented on July 20, 2024

Also full CHANGELOG is here: https://github.com/NekR/offline-plugin/blob/v3/CHANGELOG.md

from offline-plugin.

knvpk avatar knvpk commented on July 20, 2024

Hi @NekR , I just checked that now the hash tags are appending, issue is cleared. And on thing i want to know that is there any relation for this plugin and google sw-precache.

from offline-plugin.

NekR avatar NekR commented on July 20, 2024

sw-precache and sw-toolbox are cool tools for SW, they are developer by Google engineers so you may expect high quality there. About relation, there is no relation except that both offline-plugin and sw-precache are tools for ServiceWorkers. While offline-plugin is focused on a webpack (because I use it), sw-precache is focused on a more general use, i.e. with gulp.

/cc @jeffposnick

from offline-plugin.

knvpk avatar knvpk commented on July 20, 2024

Hi @NekR , in sw-precache there are three strategies like cache-first and network-first, so my question is how you are building the sw.js using which strategy

from offline-plugin.

NekR avatar NekR commented on July 20, 2024

cache-first

from offline-plugin.

Related Issues (20)

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.