Home Forums WoodMart support forum Google Font Multiply requests

Google Font Multiply requests

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #312522

    newK9
    Participant

    Hi Xtemos,

    I’m slightly puzzled as to why my test site is loading 3 requests from google for the same font (Lato) in font weights 400/700. As the link has combined the requests but the requests is made 3 times. (Picture attached)

    Any reasons why its doing this?

    Attachments:
    You must be logged in to view attached files.
    #312628

    Artem Temos
    Keymaster

    Hello,

    We have tested your website and see 3 font files loaded: https://gyazo.com/19c77f435cb01a9388b75cd93838ee56

    1. Lato 400

    2. Lato 700

    3. And WoodMart icons fonts library.

    Note that different font weights require multiple font files.

    Kind Regards

    #312669

    newK9
    Participant

    Hi Artem,

    Thank you for getting back to me. I understand that woodmart has its own font and cannot have its request combined with google. But I have 2 google font requests for the exact same font weights, 400 and 700. As you can see below request 1 is calling Lato 400, 700. Whereas request 2 is calling the exact same font, Lato in weights 400 and 700.

    Google font request 1 (

    https://fonts.googleapis.com/css?family=Lato%3A400%2C700&display=swap&ver=6.1.4

    Google Font request 2 (

    https://fonts.googleapis.com/css?family=Lato%3A400%2C700&display=swap&ver=6.1.4

    This seems deeply inefficient to load a request for the same font twice. I was wondering if I have set something up incorrectly or whether WPBakery is calling the same font again?

    This link talks about the combining of google font requests

    https://www.smashingmagazine.com/2019/06/optimizing-google-fonts-performance/#3-combine-requests

    #312694

    Artem Temos
    Keymaster

    Hello,

    We have checked your website again and still don’t see the second Google fonts file. There is only one CSS file there https://monosnap.com/file/RqkqAnwBMhhhFxenuLqC3gWaGbiU7a

    Kind Regards

    #312738

    newK9
    Participant

    Hi Artem,

    Thank you for your reply. Sadly I’m not talking about the CSS requests. I’m talking about 2 duplicate requests to fonts.gstatic.com for the same font. I have shown in the picture below.

    As you can see from the image, Request 1 and 2 are making the same request to google fonts for Lato, 400, 700. Request 1 has combined the request for font weight 400, 700 yet then is duplicated with the exact same request to google with request 2.

    This seems deeply inefficient to load a request for the same font twice. I was wondering if I have set something up incorrectly or whether WPBakery is calling the same font again?

    Attachments:
    You must be logged in to view attached files.
    #312750

    Artem Temos
    Keymaster

    Hello,

    Actually, your screenshot clearly shows that they are different fonts with different names. As I wrote, font weights 400 and 700 have two separate woff2 font files. That is why you see two font files loaded. But it doesn’t mean that you have duplicate fonts loaded on your page.

    Kind Regards

    #312780

    newK9
    Participant

    Hi Artem,

    If you look at the screenshot it shows that two requests are being made for the same request for font and weights.

    They don’t have separate requests for font weights 400, 700. As each request is calling both font and its weights in 400,700 at the same time. Screenshot shows this.

    If you click on the initiator of both requests. They are calling the same request for font Lato, 400,700. This is a duplication of requests for google fonts. As other screenshot shows.

    Although this site is loading two different fonts (Montserrat and Roboto) its loading the fonts and its weights all within one request not two.

    Site link: https://harry.is/

    Attachments:
    You must be logged in to view attached files.
    #312783

    Artem Temos
    Keymaster

    Hello,

    You don’t understand that report correctly. The column you are referring to shows the file that initiates the request. And in your case, ONE CSS file requests TWO font files (two font weights). On the example site, you sent ONE CSS file requests FOUR different font-weight https://gyazo.com/fa0b0fbba79316c349249b52ebf5902e

    Kind Regards

Viewing 8 posts - 1 through 8 (of 8 total)