2

I am planning to use caching for my website (W3 total cache plugin) and I was wondering whether the cached files will be save on visitors personal computers or not?

I know that browsers also use caching, that files are saved on the personal computers (as I think). Is there a difference between this kind of caching and the one used for websites to increase their speed?

1

It depends on the type of cache. Simply put, you've got two types of caching:

  • Client side caching.
  • Server side caching.

Client side caching, which involves the saving of files onto the user's computer:

  • CSS, images and JS files. These will be saved in the browser cache so that the user doesn't have to repeatedly download the same files from your server.
  • HTML, which can be achieved through some of the various HTTP cache headers.

Server side caching is different, as the files are stored on your server (obviously). This includes:

  • PHP bytecode. Whenever a PHP file is parsed, it is compiled into bytecode. By default, PHP will parse each file as though it is new. Because this is wasteful (PHP files don't change that much), many webmasters and server admins will cache the resulting bytecode and serve it up until the file in question changes (Look up OPcache). Implementing a bytecode cache will typically lower the amount of resources that your server is using, simply because your PHP files are not being parsed on every request.
  • Object caching. This is when the results of database queries are stored in the server's memory, using a daemon such as Memcached or Redis, etc.

When optimizing the load times of your website, it is best to use both client-side caching and server-side caching.

Note: Plugins such as W3 total cache will use file-based caching if a bytecode / object cache isn't installed. This means that physical files will be stored on your server.

  • Thanks for the information (Y) ..... I am assuming as (W3 total cache) is used for speeding up the website, so is it a Client Side Caching? or does browsers cache files on visitors computers even if I am not using caching for my website ?? – Osama Numan Nov 7 '14 at 19:36
  • Browser's will cache client-side resources pretty aggressively. However, W3 Total Cache will allow you to implement server-side caching, which will obviously speed up your website. Personally, I think that all Wordpress installations should have a caching plugin installed, simply because page load speed matters in terms of SEO. – Wexford Nov 7 '14 at 19:41
  • Thanks A LOT!! just correct me if I am wrong ... I believe now that browsers are caching files on client's side not depending on my side if using caching or not, right? – Osama Numan Nov 7 '14 at 19:47
  • No. Browsers should be caching resources by default. You can, however, bust this cache if you want to (look up cache busting). – Wexford Nov 7 '14 at 19:49
  • Please excuse my ignorance :> what I meant is that even if I am not using (W3 total cache) or any caching plugin, browsers are still caching on client's side, right? that my (W3 Plugin) will help only for my side, not related to clients side whatsoever ?? sorry again for asking too much :) but I want is just to check if in case I am using W3 plugin, will it cause the storage of cached files on clients PC or the browser is the cause ? – Osama Numan Nov 7 '14 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.