Support » Plugin: OMGF | Host Google Fonts Locally » Fonts load on Mobile but not on desktop

  • Resolved sigagan

    (@sigagan)


    Hi,

    Thanks for creating this plugin. It has improved my second last issue of google fonts. (last one being google analytics)

    However, the fonts are not loading on desktop – I have tried different browsers – chrome, Firefox and edge. And on different PCs.

    The fonts load fine on mobile version.

    My settings
    – using Autoptimize Checkbox to remove google fonts.
    – using AWS Cloudfront CDN to serve static images and CSS. I can see OMGF css is loaded from there.
    – not using async as it breaks JS on my site
    – not checked preload on any of the fonts
    – checked the logged in editors checkbox
    – using display font swap

    Your help is appreciated.

    Thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Just to check if it’s not a browser caching issue: have you tried opening your website in a private window? You can do this in Chrome, by pressing CMD (MacOS) / CTRL (Windows) + SHIFT + N or in Firefox, by pressing CMD (MacOS) / CTRL (Windows) + SHIFT + P.

    A new window will open with a clean browser cache. Enter your site’s URL and see if the fonts are shown. If so, you probably have issues with your cache, or the ‘optimize for logged in administrators’ option is checked under OMGF’s advanced settings.

    As for your Google Analytics issue, try CAOS. 🙂

    Re: CAOS – Yes, thats the plan once I get this working.

    So, I tried incognito mode in chrome and firefox private window and till no luck. I even tried opening the website, with ?nocache=1, just in case if it was a server side cache issue, and still no luck.

    It works fine on the mobile. I have checked both chrome and safari on iphone.

    The enqueue order of stylesheet is set to 10.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Your CDN seems to be having CORS issues, which means your domain (stokai.com) isn’t allowed to request the files stored in /uploads/omgf/. I see other folders in /uploads/ don’t have issues, so maybe it’s a configuration issue?

    Check your CDN’s configuration, because stokai.com should have access to all folders inside /wp-content/uploads/.

    Brilliant, it works.
    After wrestling with Access-Control-Allow-Origin settings, cloudfront distribution, invalidating old fonts, and quite literally re-setting the whole CDN configuration, the CORS issue is gone.

    Thanks a ton @daanvandenbergh, for this plugin. It’s a lifesaver.

    I have also installed CAOS now. And it is working beatufully over the CDN. I had to come back here and say thanks for building these great 2 plugins.

    Plugin Author Daan van den Bergh

    (@daanvandenbergh)

    Happy that you managed to get it work, @sigagan! Would you like to leave a review?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.