The latest versions of the Divi Page Builder includes very smart caching. This can sometimes lead to problems where users find they can’t add or delete rows or modules or use custom modules.
Disclaimer: I’ve only really experienced this issue when developing module customisations. So this may not work for your specific Page Builder caching situation. Results may vary.
LocalStorage
Divi’s Page Builder uses the JavaScript LocalStorage API. Basically this allows the Builder to store the Page Builder cache on your computer instead of in your browser, meaning that even clearing your browser cache does not clear the Page Builder cache.
You can see the LocalStorage elements from your browser’s inspector window. In Chrome it is found under Resources (see image below)
To clear the LocalStorage items you need to run a line of javascript in your inspector window’s Console tab.
for(var prop in localStorage)localStorage.removeItem(prop);
I’ll expand this below so you can see what its doing.
for (var prop in localStorage) { localStorage.removeItem(prop); }
What this does is loop through each property in LocalStorage and remove it from LocalStorage. Simple!
UPDATE 05/11/2016 As John kindly pointed out in the comments below an even quicker way to clear the local storage would be to just clear the local storage object.
window.localStorage.clear()
Once you’ve done this you’ll need to refresh the page to see if it has worked.
It’s worth noting that any other web apps you use that may use LocalStorage will also be cleared out, so it’s perhaps best to check if there are any other LocalStorage properties that aren’t Divi specific.
For those who aren’t as tech savvy to know where their inspector window is or how to use it, I’ve created a simple plugin that will clear all localStorage while using the WordPress admin interface if activated. I don’t recommend you leave it activated at all times. You can download the plugin here. Please note that this runs some JavaScript in your admin view, so once you activate it, refresh your admin view and leave it for a few seconds, before trying the Page Builder again.
I’d love to hear if this solved your specific Page Builder caching issues, so please leave a comment below if this helped you.
Leave a Reply to JonathanCancel reply