Deactivate caching: why you should never build/develop websites with caching activated
Why deactivate caching while you are building a website?
- If you build a website with caching activated you will not see the updates you have made. You could see the cached version of the page.
- And if you published a page and then go back to make more updates to it like CSS styles. Again you might see the cache version.
- So you run the risk of seeing old things you have already changed.
- Or you make an update, forget to clear the cache, review the page - everything looks fine and then the next time cache clears the page is not how you expected it to be. You scratch your head and go "how did that happen? I'm sure I checked it" That's most likely a caching problem.
To prevent files from being cached during development, we recommend you disable caching plugins and tools and completely clear the cache memory.
How to do it:
- Important: Divi Theme setup. Before you build new pages with Divi theme first do this. Steps 1-4 in the screenshot below 4 Divi Theme settings you must change before building pages - Then come back and do the rest. You can download the screenshot if it is too small to view in your browser.
- Browser caching for desktop, tablet or mobile devices (web visitor or your own browser). How to clear your browser cache or load the page in a Private or Incognito tab. Or use a cache buster plugin for your browser.
- Plugin caching (a plugin like wp-rocket, fastest cache, w3Cache etc). Deactivate the plugin or find the relevant setting.
- Server-side caching (Plesk, cPanel, Webmin etc.) - Consult hosting company knowledge base or support.
- CDN caching (Cloudflare, AWS Cloudfront, Max CDN etc.) - Consult support files and/or find the setting. Note: this can take up to 30 min to reflect changes.
- Hosting provider caching (Managed hosting like WpEngine, GoDaddy and many others) - Consult hosting company knowledge base or support.
Different types of caching Note that any one or all of the caching types could be active at the same time. And some you may not even be aware of. Best to look for, and deactivate all caching first, before you do any development.
- Browser caching for desktop, tablet or mobile devices (web visitor or your own browser)
- Plugin caching (
- Theme level caching
- Server-side caching (Plesk, cPanel, Webmin etc.)
- CDN caching (Cloudflare, AWS Cloudfront, Max CDN etc.)
- Hosting provider caching (Managed hosting like WpEngine, Godaddy and many others)
When should I use website caching?
If you are thinking about adding caching to your websites, you probably want to increase load speed for better SEO and a faster user experience. But, before doing that, you should understand how it works, what it actually does and if it's the right time to do it.
What is caching?
Simply put, caching is the process in which all the website data that's already loaded is temporarily saved. This way, the next time when you open the site, instead of loading all that data again, it will be automatically pulled out for you from this temporary data storage. This greatly improves the time it takes the users to load your site, however, there are some things to pay attention to.
The main thing to keep in mind is that data normally stays in the cache memory for a set period of time (2hr, 6hrs, 12hrs) or until the cache is cleared. This means, that if you make any change to your website (CSS or Scripts), it may stay invisible to your user or even you because he's loading the site from cache memory. This isn't a problem if you rarely update your website.
Now imagine you are developing your website and you have some sort of caching active. None of the changes you make will show in your browser. Or some will show and others will not. Or there is a delay in some caching that you don't even know about. This can be infuriating because it works intermittently and changes show up at random. It can literally drive you crazy and you blame everything else when it could be caching.