• Resolved sailors

    (@sailors)


    Hi,

    This might not have something to do with your plugin but I hope you have some solutions. I get a bunch of font errors and the following is one of them,

    Access to Font at ‘https://stylusdesign.co.jp/wp-content/cache/omgf-webfonts/open-sans-300-normal-Uuhp.woff2’ from origin ‘null’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access.

    Is it something I have to do with adding some code in .htaccess file? I had google map on my contact page but since it slows down my site I removed it. However, its embed link shows up next to the error above in the dev tools(F12).

    I also removed all google related URLs from Prefetch DNS Requests in Hummingbird plugin.
    Please advise.

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

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

    (@daanvandenbergh)

    Hi,

    I can definitely tell you that this is a server configuration issue.

    What’s weird is that everything is successfully loaded, but for some reason your server is loading everything twice, once successfully, once throwing errors.

    I suggest you contact your hosting provider. There’s nothing I can do for you here. Sorry.

    Thread Starter sailors

    (@sailors)

    Thank you for your reply, Daan.

    I’ve been trying to make improvement for last couple of days but noticed something funny is happening on my site cache from either Cloudflare or/and Hummingbird plugin. My changes weren’t reflected soon even I kept deleting all cache but I finally saw some improvement this afternoon, Google map is finally gone out of PSI all of sudden and the 70+ CORS policy errors went down to 24. Some other errors have been cleared, too. I think your plugins helped, too.

    BTW, I set Font-display option to swap and followed the instruction to generate, is it supposed to clear PSI “Ensure text remains visible during webfont load” warning, right?

    And I use Cloudflare and leave “Serve fonts from CDN” empty, should I enter anything there?

    Plugin Author DaanvandenBergh

    (@daanvandenbergh)

    Don’t enable caching stuff, until you’re completely finished with making changes. It’ll create a lot of unexpected behavior. Sometimes changes do come through, sometimes they don’t, even when you’re 100% sure you flushed everything.

    And yes, setting it to swap should get rid of that notice for Google Fonts. If you’re using any other fonts, it’ll still be there for those files.

    Thread Starter sailors

    (@sailors)

    Ahhh, that would explain why I’m getting weird behavior, and was wondering why it hasn’t fully improved yet, will disable those two caching features and try again.

    Thread Starter sailors

    (@sailors)

    I got better results with fewer errors this time but PSI score hasn’t changed much, mobile 38 / desktop 35. I still get that persistent “Ensure text remains visible during webfont load”. Here’s my step,

    1. I made sure that Font-display option is set to Auto(default) first, then clicked the Auto Detect button.
    2. I opened my home page and let all fonts load, refresh it(ctrl+shift r) just in case, went back to OMGF page and clicked the top link to refresh.
    3. I checked all fonts for preload option and downloaded fonts.
    4. After that I changed Font-display option to Swap, saved it, and finally generate stylesheet.

    I also got this “Specify a character set early” errors for a lot of woff2 and here is one of them,
    https://stylusdesign.co.jp/wp-content/cache/omgf-webfonts/josefin-sans-100-italic-LSzo.woff2

    I will search for a solution tomorrow since it is 1am now, need to sleep but if you have some solutions please advise.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CORS policy errors’ is closed to new replies.