Post by imager » Tue Nov 09, 2021 8:56 am

Wondering if anyone has ventured into the optimization of their OC install to minimize page load speeds.

One opportunity would be to eliminate the loading of external font files, such as Google fonts, and use default browser fonts.

In running Google PageSpeed Insights on a site, there is a fairly large delay (780 ms) in loading an external font file.

Currently seeing the following on PageSpeed:
Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles. Learn more .FCPLCP
URL: /css?family=Open+Sans:400,400i,300,700(fonts.googleapis.com)
Transfer Size: 1.8 KiB
Potential Savings: 780 ms


Wondering if anyone has looked at either hosting the font file(s) locally (is it possible?) or removing the dependency on external font file completely just using local browser fonts.

Thoughts??

New member

Posts

Joined
Fri Nov 09, 2012 7:05 pm

Post by by mona » Tue Nov 09, 2021 10:30 am

The majority of sites do use google fonts. You should minimise it, but that does not mean you should eliminate it altogether.
The web would be a very boring place if there were only the web friendly fonts used and then in theory images take time to load so we can remove all of those as well.

Open+Sans:400,400i,300,700

Using this example - do you use italics ? why load 400i if not ? would arial do instead ?
do you use all three font weights ?
It does not say not to use but to optimise everything.
Even localisation of fonts is not ideal if you use too many.

Best search google for IP_CAM post in the opencart forum for web speed - he has some great knowledge posted on here and does get close to 100% !!

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by OSWorX » Tue Nov 09, 2021 3:16 pm

imager wrote:
Tue Nov 09, 2021 8:56 am
Wondering if anyone has ventured into the optimization of their OC install to minimize page load speeds.

One opportunity would be to eliminate the loading of external font files, such as Google fonts, and use default browser fonts.

Wondering if anyone has looked at either hosting the font file(s) locally (is it possible?) or removing the dependency on external font file completely just using local browser fonts.
Yes, this is a quite simple task, made an extension to use Google Fonts from a local copy for it, but still not published.
Using it at some clients.
If you're interested, contact me.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by thekrotek » Tue Nov 09, 2021 6:17 pm

Google Fonts are usually loaded via CSS, so just edit theme's CSS file accordingly.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by alexmorco » Sat Nov 27, 2021 7:54 pm

yep, this does work. However, I feel the impact is probably going to be minimal. I'm using Cloudways hosting with a Vultr HF server, and it works like a charm for me. I believe it's more about your hosting than anything else.

Newbie

Posts

Joined
Wed Jan 31, 2018 6:43 pm

Post by by mona » Sat Nov 27, 2021 10:48 pm

Hi Alexmorco

Not the best promotion for your organisation.

Your posts serve only to repeat the answers that have already been provided and a plug for your organisation. They offer nothing in that way of assistance nor show any knowledge of Opencart or that you, as a host, are able to assist any of the issues posted.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 217 guests