GithubHelp home page GithubHelp logo

learning-web-cache's Introduction

  1. 如果只设置Expires为一个值,比如 ctx.set("Expires", new Date("2022-02-22 16:12:00"));,那么,在这个时间之前是会使用 浏览器的memory cachedisk cache
  2. max-age(单位为s)指定设置缓存最大的有效时间,定义的是时间长短。 当浏览器向服务器发送请求后,在max-age这段时间里浏览器就不会再向服务器发送请求了。是会使用 浏览器的memory cache
  3. Cache-Control 优先于 Expires
  4. Last-Modified 上次修改的时间
  5. ETag的作用: 设置了之后,再次请求,会和If-None-Match做对比,如果一样,就304
  6. 与 Etag 类似,Last-Modified HTTP 响应头也用来标识资源的有效性。 不同的是使用修改时间而不是实体标签。对应的请求头字段为If-Modified-Since

learning-web-cache's People

Contributors

yyyuan-javascript avatar

Watchers

 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.