While building my site, I regularly use the “Code” element to create custom elements and execute code snippets. All of these code elements are being executed.
I’ve noticed that Bricks is still loading Prettify CSS and JS files on the frontend. I assume this is for styling code when you want to display it to visitors. However, if you only use the “Code” element to execute code, you don’t need the Prettify files.
I think these files shouldn’t be loaded when the Code element is used only for execution purposes, as it creates unnecessary overhead.
Please disable code execution in your code elements and check whether you have selected a “theme.” If so, reset the setting. You can then re-enable code execution.
Also, make sure you haven’t set any theme in Element - Code in the theme styles.
Thank you for your reply. The initial issue was indeed related to the theme styles. However, your advice didn’t help at first. I had to completely remove the old code elements and create new ones. I believe there is some underlying issue. Before that, I had checked all elements, and the “theme” option was disabled everywhere.
I can’t replicate it. It works instantly as soon as I clear out the setting in theme styles, meaning prettify isn’t loaded at all. Are you using some caching or “optimization”?
However, if the code is executed, the theme style setting shouldn’t matter. I’ll create an improvement task for that matter.
The cache plugin is off, and there’s nothing else enabled. I’m experiencing this issue on two sites. I was able to solve it on some pages, but not all. The home page still loads them. I should also note that I’m using a lot of code elements—about 20 or so.