• Hey I have been using this plugin recently at it has helped with the request times ect, but I was wondering if the combine would bundle the 4 google font requests into one?

    Regards

    • This topic was modified 3 years, 8 months ago by fluiddesk.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi!

    That’s good to hear! Happy OMGF has helped you in your optimization journey ??

    To explain you what the combine and dedupe option in OMGF Pro does, I’ll give you an example:

    Let’s say you have to the following requests:
    https://fonts.googleapis.com/css?family=Roboto:100,200,300
    https://fonts.googleapis.com/css?family=Lato:100,200,300|Roboto:100,300
    https://fonts.googleapis.com/css?family=Poppins:100,200,300|Lato:300

    The combine and dedupe option will combine this into one request and deduplicate fonts, e.g.

    https://fonts.googleapis.com/css?family=Roboto:100,200,300|Lato:100,200,300|Poppins:100,200,300

    After deduplicating it, it’ll download the font files, generate its own stylesheet (100% cross browser compatible) and serve it from your server.

    I hope that clears things up! Let me know if you have any other questions!

    Thanks,

    Daan

    Thread Starter fluiddesk

    (@fluiddesk)

    Hey Daan,

    Perfect thank for you for the reply ?? I have purchased the plugin but it cannot find the licence when the plugin is installed, If you could please help with this, thanks!

    Regards

    Edit: Dropped you an email regarding the way that the pro is loading if you could get back ASAP

    • This reply was modified 3 years, 8 months ago by fluiddesk.
    • This reply was modified 3 years, 8 months ago by fluiddesk.

    We also have Pro but we still see a font like Oswald loaded once per font weight. So we must miss something. Set detection to auto and do have them all loaded locally.

    Here one of the four Oswald weights loaded copied as curl request:

    curl 'https://domain.com/wp-content/uploads/omgf/pro-merged-749/oswald-normal-300.woff2' 
    -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0' 
    -H 'Accept: application/font-woff2;q=1.0,application/font-woff;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed 
    -H 'DNT: 1' -H 'Connection: keep-alive' 
    -H 'Referer: https://domain.com/wp-content/cache/min/1/2db75bab7f3f4bea818ccac3ab128249.css' 
    -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' 
    -H 'TE: Trailers' 'no-cache' -H 'TE: Trailers'
    • This reply was modified 3 years, 6 months ago by Rhand.
    • This reply was modified 3 years, 6 months ago by Rhand.
    • This reply was modified 3 years, 6 months ago by Rhand.
    • This reply was modified 3 years, 6 months ago by Rhand.
    • This reply was modified 3 years, 6 months ago by Rhand.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    we still see a font like Oswald loaded once per font weight

    I’m not sure I understand what you mean with this. Could you explain a bit further?

    Also, please explain what the CURL request is supposed to tell me ?? I see that you’re using WP Rocket and that the stylesheet is properly loading the font.

    In short, please expand ??

    The homepage is loading multiple fonts as multiple are used. We were however expecting OMGF Pro to load font weights together and thereby reduce requests. But we do see 5 Oswald .woff2 requests as well as multiple requests for other font weights.

    Does this mean Combine & De-duplicate multiple requests into one stylesheet just mean one stylesheet, but that we still need to load each font weight once from our server then?

    NB As for the curl thing, if you use inspector in Firefox Developer you can store get requests in different ways, I copied as a curl request.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Ah, this is much clearer.

    Yes, OMGF Pro does not combine fonts into one font. As far as I know, this is not possible with webfonts (yet). Because you also need to declare them in CSS as different @font-faces, e.g. @font-face { font-family: 'Roboto'; font-weight: 600; font-style: italic; src: 'https://path.to/font/file.woff2'; }

    So, this isnt a shortcoming of OMGF Pro as such. It’s simply how ‘the internet’ works at this point.

    While typing this answer, I did a quick Google Search and found this StackOverflow discussion: https://stackoverflow.com/questions/59811493/web-fonts-mergecombining

    One very smart man says the following:

    Possible: yes. Tricky: quite. Legal? maybe, but probably not. Practical or even sensiblel? No, not in the slightest. Web fonts already get downloaded concurrently, the browser does not “download one, then another after it’s done”, it just downloads them all at the same time,so combining them into a single font can actually make your time-to-first-render take longer if you combine them. Just don’t do it. Number of HTTP request is not your bottleneck. Don’t optimize for it until it is.

    So, apparently it is possible. But unfortunately I couldn’t find anything on how. Then again, it makes you question if it is at all necessary.

    Hope this clarifies things!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Pro question regarding combine’ is closed to new replies.