• Resolved rajupp

    (@rajupp)


    Hi,

    While testing the page on Pingdom Tools, I see that the fonts are loaded both directly as well as CDN. I don’t know why. I obviously want to use my CDN to serve the fonts, but don’t know how to stop it from serving directly. Please help.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Do you have ‘Remove Google Fonts?’ enabled?

    Thread Starter rajupp

    (@rajupp)

    Yes.
    Just to be clear, it’s the exact same files served from server and cdn.
    Screenshot: https://imgur.com/a/4nNP8r6
    The first two are from techpp.com while the next two are from cdn.techpp.com
    Exact same filenames.

    • This reply was modified 4 years, 6 months ago by rajupp.
    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Hi,

    I think it was a glitch on your server! Everything’s loading fine on my end: https://imgur.com/a/zIgPKt0

    Thread Starter rajupp

    (@rajupp)

    This is from Gtmetrix. But it’s same from every other tool. I don’t know what I’m missing. Can Cloudflare play foul in any way? https://imgur.com/a/19Amitc

    @rajupp It is so clear, I used Firefox to check out your website and it loads them twice. It loads them both times from CDN, but also twice. On GT Metrix it says that 2 are loaded over CDN and 2 over normal website, yet it still loads them twice while that is not needed.

    https://i.imgur.com/iNBrj4O.png This is exactly my issue.

    Edit: why did you mark your topic as resolved?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Guys, I’m going to look into it ASAP. I’m currently in the middle of buying a house. ??

    @daanvandenbergh the problem is due to your recent Firefox change of using relative paths, because then, the preloaded fonts come from the main domain, while the fonts stylesheet causes them to be loaded again from the CDN, because it uses absolute URLs.

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    @galbaras <u>That’s</u> the kind of feedback I’m looking for.

    I should’ve seen this, instead of blindly following Mozilla conventions. I reverted the change and the preload function now includes the absolute URL (instead of the relative path).

    No more double requests.

    @wesleydevries95 This doesn’t mean that the fonts you’re theme/plugins are loading with Webfont Loader will disappear. You should look at it this way: at pageload OMGF detects all available Google Fonts and performs its magic. Webfont Loader makes sure Google Fonts are loaded asynchronously, i.e. after pageload. At that point, server side changes aren’t possible anymore, because all necessary information is already received and rendered by the browser.

    @rajupp, you’re bug should be fixed now.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CDN duplication issue’ is closed to new replies.