Small Snap! Logo Snap! Websites

Work in progress
Snap! C++

Incredible Websites for Incredible People

Snap! and Caching

Introduction about Caches

In order to make you and your viewers web experience as good as possible when visiting a Snap! Website, we use different cache technologies which at times can end up in your way.

The following documentation is expected to help you deal with the caches while you work on your website.

Note that by default everything is automatic and you should not have to do anything. However, once in a while a page needs to quickly be changed and the following should give you all the necessary tools to fix such problems.

If you still cannot figure it out or you think that there is another problem, do not hesitate to contact us for support.

Server Side Caches or Snap! Caches

On the Snap! server, we make use of 3 levels of caches. One of which you can control very effectively.

Snap! Static Cache

This Cache is also called Boost.

When the first anonymous user comes to your website, the Snap! system builds the page and saves the resulting HTML on disk. The result is that all the following anonymous users do not see much latency at all when visiting the same pages as previous visitors. This makes for a close to instantaneous browsing.

This cache lasts between 1 whole day and 1 whole week. After that amount of time, the page is automatically deleted and rebuilt. This means that for that long period of time, all the anonymous users see the same thing, whether you make changes to the blocks on the sides or not.

We offer a set of blocks that allow you to reduce the amount of time such pages are cached (although the minimum remains 1 day) and a way for you to erase this cache on a per page basis. This is done with the Boost Blocks.

Boost: Pages cache configuration

Use the Pages Cache Configuration block to change the duration of the cache for a page. You may want to change the cache for your front page or your most visited page, whichever page this might be.

Boost Flush Page and information.Boost: Pages cache status

Use the Pages Cache Status block to know whether a page is cached in the Snap! Static Cache. If so, you will be shown a Flush Page button.

Multiple Domains

When we create your new Snap! Website we assign it a free Snap! Sub-domain using your new website number. It looks something like this:

http://snap123.snapwebsites.info/

If you own a domain name, then you will want to use it instead. (How to do so is a different topic...) Once you assigned your own domain to your website, the pages are saved in a new Snap! Static Cache named after your domain. In other words, you end up with two somewhat different websites (although both show you the exact same thing when you are logged in, if you are not, the caches being different you may see quite different things on both sites!)

The full clear the static cache you want to log in both websites and click the Flush Page button on each page that needs to be refreshed. In general, the site using the Snap! Sub-Domain doesn't need to be flushed, it will happen automatically and it can always be late, it shouldn't matter. Just use your domain name to access your site.

Snap! Dynamic Caches

Snap! runs with a strong database system which is used to cache pages and forms shown in a Snap! Website. These caches are handled by the system and you have no direct access to them.

It is really rare that these caches cause problems as the system is really robust and knows perfectly when such caches need to be deleted.

Snap! File Caches

Snap! compresses all the JavaScript and CSS files used by your website. This saves a lot of space and generally renders the upload of the pages as a whole faster. Again, these caches are handled by the system and you have no direct access to them.

It is really rare that these caches cause problems to end users like you. Web designers who create themes may run into problems when this cache system is activated. Deactivating this cache capability is their best bet. In our case, however, there should be no problem related to these files.

Client Side Caches or Your Browser Caches

Whenever a website is loaded, the pages are cached by your browser. In most cases, those pages go out of scope and thus get reloaded only when the date they were assigned when loaded is past, although most browsers will keep any one file only for a set amount of time (i.e. 2 weeks.)

When you are logged in your Snap! website, the pages of content (the HTML code) is always marked as out of date. In other words, your browser will never cache those pages. However, when you are navigating to your website before logging in, you are likely to see pages from the Snap! Static Cache which are remembered for a while (1 to 7 days.) If you want to reset your browser cache for those pages, there are a few things you can do1:

  • First you'll want to hit Reload to make sure that the page is considered up to date by your browser
  • Assuming the page still looks out of date, try clicking on the Flush Page button from the Boost: Page cache status block (Remember that you need to be logged in and have the Boost: Page cache status block setup to see that button! By default that button is hidden.)
  • The browser Reload button is expected to clear the browser cache but that does not always work; to fix that last problem, you will want to clear the browser caches, how to do so varies from browser to browser (they even use different terminology for the cache data such as "offline data"!)
    • Clear your Firefox Cache
Snap! SEO e-Book Index:
  • 1. Do not forget that testing your cache needs to be done as an anonymous user, so if you are currently logged in (you see your toolbar on your pages) then log out first! On my end, I generally make use of two different browsers such as Chrome and Firefox. I am logged in with say Firefox, and check as an anonymous with Chrome.