Learning Cache

Learning about cache web design in Tokyo

A "Cache" makes a website FAST!

A website "Cache" is a slightly difficult concept to understand but to put it simply, a "Cache" makes your website run much faster. Think of a Cache as "previously downloaded content" or "pre-generated content". Instead of downloading the content again or regenerating the content, the Cached content is loaded.

For examaple, if you went to SnapJapan.com (a website about Japan) in the morning and then went back in the afternoon, you would have already downloaded a bunch of images on your first visit. Instead of re-downloading all those images, your browser cache would quickly load the images you had already downloaded.

Two Caches!?

Now, to make things even more complicated, there is more than one cache. There are two main caches, your browsers cache (#3 on the image) and a cache the website might use (#5 on the image). Your browser cache keeps previously downloaded content while a website cache pre-generates pages so they display faster. If you visit a website page without caching set-up, a bunch of code has to run and hundreds of database calls are made. With a cache in place, the code and the database calls are pre-generated and the compiled page is placed in the cache.

Web Design advantages of using a website cache

  • Speeds up the loading of your websites pages.
  • Cuts down on the amount of resources (RAM and Processing Power) you website needs. If you use a cache, the cached content is generated ONCE (for a period of time), for a lot of people. If you don't use a cache, the page has to be generated (using RAM and Processing Power) for EVERY visitor!

Disadvantages of using a website cache

  • Newly uploaded or changed content may not been seen by visitors right away (see example below).
  • Once in a very, very great while... caches mess up, i.e. cached content gets cached weirdly or pages display strangely on the front-end or back-end admin area. This is a very minor problem that can be easily fixed by just "clearing the caches" (1 button click).

The advantages of using a website cache GREATLY outweigh the disadvantage.

"I don't see it"

A common conversation with a website owner and a web designer, developer or content specialist:
Developer: "Ok, content has been added."
Website Owner: "I don't see it."
Developer: "You have to clear your browsers cache or do a hard refresh."
Website Owner:"Clear what? Hard what!?"

How to see the latest version of a page

1st, when on the page, try a Hard Refresh "Ctrl+F5". A hard-refresh forces your browser to NOT use it's cache and get all data from the server. Unfortunately this is only possible if you are using a keyboard (not a mobile device) and it may not work all the time (depending on a variety of issues) but, try it first.

2nd, clear your browsers cache "Shift+Ctrl+Delete". If after you try a Hard Refresh and you still don't see the new content, try clearing your browsers cache. On desktop computers, for most browsers press "Shift+Ctrl+Delete" and the "Clear Caches/History" dialogue box will pop up. I just check everything and select "from the beginning of time" to make sure everything is cleared out. Note that if you have any username/passwords saved when logging into websites, those will be cleared as well (you'll have to re-sign in). On a mobile device... every device and browser is different but go into the browsers settings, look for "privacy settings" or something like that and eventually after digging deep you'll find the spot to clear the caches. Browsers like to hide this stuff so they can keep tracking you with cookies placed in the cache. Clear the cache and it removes their tracking cookie. If you still can't find it, do a search on "how to clear caches for [so and so] device using [so and so] browser." It's actually a good thing to learn.

3rd, clear your browsers cache "Ctrl+F5" AND then do a Hard Refresh "Shift+Ctrl+Delete"

If you Still don't see the new content/page layout, this means that most likely the website itself if caching all it's pages. The only thing you can do is wait until the cache is re-generated by the website (usually a few hours but some sites cache pages for a full day). Or, if it's your website you can contact the developer and ask to, "please clear the sites caches so I can see the new page."


Website Design and Developent Related Pages

Have questions? 

070-2667-3249 Tokyo, Japan