I know this sounds pedantic but I'm currently optimising our website. This means trawling through network requests and bundles making sure to cut bloat where I find it. Is there any way we can add a param flag to the new toolbar to remove 'cosmetics' like unneeded fonts? It feels a little bit cheeky that I'm over here cutting bytes everywhere I can and Prismic be dumping fonts into my production page.
Improving the performance, seo and score of your website is always important.
We recently released a new version of the Toolbar, as mentioned in our progress page, and one of the things that we're more excited about is the fact that the Toolbar itself is way lighter than before:
"We drastically improved the performance of the toolbar script. This script is now almost ten times smaller than in the previous version. We managed to make it 100Kb lighter (from 120kb to 14kb) than previously. This will impact all users visiting your website and on the overall performances of your website."
To know if you have this newer version which includes code splitting and smaller file size you can check by typing prismic.version in your browser console for you website like so:
The version should be 4.0.0 , like above. If you don't have this then clear the cache in the browser to refresh and get then latest toolbar.
Although thus is not related to the font embedded into the toolbar, I thought you might want to hear this good news.
As for the styles of it, we don't recommend people to modify the script of the Toolbar because it may cause things to break. So we don't currently have an option to change de CSS properties of it.
Could you tell me in which way is this causing you problems in the dev process?
The issue isn't really anything more than the fact the new toolbar side loads the font Source Code Pro from Google fonts which is entirely unnecessary. Arial will do, it sounds pedantic but I don't need 645 bytes downloaded when a client is never going to see it.
It seems like it, i've asked the dev team so they can communicate us if there's a reason for having the two fonts. I'll keep you posted in here about any information
In the meantime, what you could do to not have the extra font on your project would be to completely remove the Preview & Toolbar script from your project. We do not recommend this as this will prevent you from making previews in development or production (so you could to share with your client) in the future.
Hey Gareth, this task is still on the devs pipeline, the team will take over it as soon as possible but we don't have a rough ETA on when this is going to be. We'll update this thread when we have news about this.
Hello, just wanted to give you a quick update about this. We've defined that this is a fix that'll be sorted out in the future but we don't have a rough ETA for it's release, therefore I'll leave this thread as an open feature request for future enhancements.
My team and I recently updated our website's Prismic implementation and our companies compliance team alerted us to the fact we now have a google font dependency we now need to declare in our GDPR consent banner. The preferred solution for us would be to either self-host the font or if possible entirely remove any need for the font.
There's been no change to the presence of this font, but the Prismic Toolbar script and font should only be loaded for logged-in Prismic users, so you normal (non-Prismic) website users should never see this script or font, but I'll confirm with the team.
Unfortunately the font does load for all users not just logged-in Prismic users (tested in incognito), which is how I suppose our compliance team became aware of it so quickly
Is this the correct GitHub repo for the toolbar? I see the latest version there is 4.0.4, but I see version 4.0.5 on our website.
Sorry for the double post didn't realize the flag comment would eventually appear.
Hello, has there been any update regarding this issue? I want to self host Google Fonts in all of my projects and I would like to get rid of this API call to Google Fonts made by prismic? Is there a way to do that?