Code Monkey home page Code Monkey logo

Comments (3)

libern avatar libern commented on June 10, 2024

建议加入内存缓存,将js和css可以存入内存。以便更快读取。

from hybridcache.

easilycoder avatar easilycoder commented on June 10, 2024

hi,@libern

不知道你缓存js、css文件的初衷是什么。实际上,在http协议本身,就自带了关于缓存管理策略,而且webview本身也支持这些缓存策略。具体的你可以了解一下http协议中的Cache-Control相关的内容。而这种机制本身能帮助我们在缓存有效期间,重新打开网页的时候,减少流量的损耗。

from hybridcache.

libern avatar libern commented on June 10, 2024

这个我当然知道。用浏览器默认的缓存策略。
但是你可否知道,浏览器的缓存区是有大小限制的。超过了,旧的就会被移除。

主要做Hybrid的APP,所以,现在的WebApp打包出来的js大概有1-2m,还有一些其他的js和css也不小。所以,希望在app被强制关闭之后,再次开启app,无需从互联网上重新下载(假设缓存已经失效),而是能从自己的缓存中读取。

from hybridcache.

Related Issues (5)

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.