Git Product home page Git Product logo

Comments (2)

DuCanhGH avatar DuCanhGH commented on May 31, 2024

Here are blogs related to caching:

Well, seems that you want to precache some files. I notice that you use Next.js, so there's a few things to keep in mind:

  • If you want to precache some pages, fonts, and images, you will have to use additionalPrecacheEntries. This option expects you to generate revision yourself, which is quite a pain, but I guess you can simply create an utility function that can hash a file's content. Hopefully we can improve this field a bit. One thing to keep in mind is that it is not recommended that you precache server-side rendered pages since they will then always be served by the precache rather than the network until the service worker is updated so that said pages should not be precached.

  • @serwist/next precaches all CSS and JavaScript files for you out of the box unless you use exclude, excludeChunks, include, or includeChunks.

  • Don't think about precaching HTML files 💀 With how Next.js does its things, you just can't get a proper list of HTML files to precache.

Also, next time, please use GitHub Discussions if you want to ask a question. Our Issues is only meant for bugs and feature requests.

from serwist.

github-actions avatar github-actions commented on May 31, 2024

This issue is stale because it has been open for 30 days with no activity.

from serwist.

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.