Published Brizy page still loads huge preview css/js files?
Dear Brizy community,
I was wondering whether this is a known 'thing'. We are using the wordpress plugin to make some pages, and when they are published - and we are logged out of wordpress - the heavy preview css/js files are still loaded. The following screenshot shows the size and what files are being loaded - in Opera, a new anonymous tab, cache disabled:
These CSS/JS files are extremely heavy and I do not need them in production. These are for the block editing/preview mode, am I correct? Is there anything we can do about this, or am I 'doing it wrong'? The preview css is included right below the print css of my theme, with link id 'brizy-preview-css'.
Thanks for explaining!
-
Hi,
Your preview will not work without these files. We are constantly improving the CSS and optimising stuff, but these are the preview css and js files, they will not be 10kb.
I'm not sure what you mean by heavy? Consider that you can offset that with 1 un-optimised image in only one of your pages.
Together with good hosting, a cacheing plugin, and an internet speed that is not crawling, you get almost instant loading.
The CSS will be cached as static content and if you really want to go the extra mile, you get a CDN as well from your hosting.
Hope this helps.
1 -
Hi Dimi, thanks for your reply!
I understand that the preview files will never be small and I'm okay with that, but I do not understand why these files are being included in the pages while I am logged out. I do not need a preview then. My website visitors will also be loading that file - the preview files are only for when editing using the plugin (or is this not correct?)
I enabled CSS and JS gzip compression on my server and now it's indeed reduced in size, to about 200kb. But that's still one file too much if it is not actually needed. See my screenshot - my question is actually: why are these still being loaded?
1 -
Hello Jef. Have you got an update on this post? This is a general problem, I think.
1 -
Hey Jef, those files are named preview because they refer to the front end preview for the users. It has nothing to do with either you are logged in or not. You saw the preview name and thought those files should work only when you preview the page when logged in, but it has nothing to do with that.
Those files need to be there and preview is just a name, if they were named crocodile.css and .js it would not made any difference. Well maybe we would not have this conversation, probably we would have discussed why we named them crocodile and not something else :).
We are always updating and optimising, it's a process, we can't change everything all at once, there are all kinds of dependencies and very complex connections that can break the styling and create all kinds of problems.
- gzip, cache, CDN
0 -
Bart, there is no general problem here. Actually there is no problem at all. Brizy will not work without those files.
-1 -
Thanks a lot Dimi, that clears up things. I experimented with it by removing it from the HTML in devtools and indeed came to the same conclusion: that it's a required file :-) I was confused and/or suspicious because of the filename!
Maybe if it was called crocodile I wouldn't dare to touch it haha!
Thanks again.
0 -
No worries. Glad I could help.
We are constantly looking to optimise in fact I know for a fact that the guys are planning some optimisations regarding CSS, but it will happen over time, it's a process.
Cheers.
0 -
Still, those files are recommended for removal by Lighthouse in DevTools, as one of major reasons my SI get close to... 10 out of 100 :/
0 -
Hi,
Could you please send us the URL link of the site you receive this problem? Do you have the latest versions for Brizy Free 2.2.17 and Brizy Pro 2.2.11? Do you optimize the entire site?
Best regards,
Sandra0
Please sign in to leave a comment.
Comments
9 comments