The other day, when I was working on the Better Number Counter, I was playing around with the fields of the module settings – you know, the title, the number and stuff. I noticed, that after I added a switch in code, the switch wouldn’t show up on the settings panel. No matter how hard I hit the reload key, how often I cleared the browser cache, how many times I deleted the plugin and reuploaded it, it just didn’t work.

I then change the modules slug and suddenly, the new switch popped up into existence. It came to my mind that there must be some sort of caching of the settings going on. So I started a little web search and quickly found an article by Jonathan Bossenger, who greatly explained, what was happening. In short words, the Divi Builder uses the LocalStorage JavaScript API to store cached values.

To clear these values, just run the following command on your browsers JavaScript console.

window.localStorage.clear()

I wish I had known this earlier, because it would have saved me a good hour of swearing and debugging. I suggest you checkout Jonathans post and continue to be a happy developer. Making changes to your code and not seeing them can be really annoying. Especially when you try little modifications of other parts which are all working fine.

In my case, I could for example add text or divs to the modules output (the one which you later see on your page) but the newly added settings switch in the backend would just not show up.

Well, at least know I know what was really going on and this will surely be advantageous at some point in the future. You know, that day when I will encounter some mysterious problem and remember this magical line of code which clears what is actually a good and clever mechanism to speed up the page loading time.

Pin It on Pinterest

Share This