Caching

Caching is the process of storing certain assets locally, so that they can be used again without require a full round trip request to the server. HTML, CSS, Images and JavaScript can all be cached. Caching is controlled by setting an expiry label, so that the browser knows how long an item can be stored an re-used, and when it should be fetched from the server freshly. Proper caching settings will speed up the load time for users, so Google recommends that webmasters set caching lifetimes for most static assets for one year. Using strong version control practices with your assets will also allow you to use long caching lifetimes, because if a file name changes, the server will automatically request the file from the server and not use the cached version. Not setting a caching lifetime tells the server that an asset must be fetched freshly each time and may not be cached at all. This often causes slow load times.