Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1003581

    I’m continuing to optimize my website, so I switched on the CDN option (All Files) within the WP Rocket, also CDN itself I used to switch on @ my provider, Cloudways. I got a performance increase, but briefly looking at my website layout I lost displaying both my social icons also my fantastic / fontello font (yours & mine).

    – IE Admin, Chrome Admin, Firefox Admin – NO Issue
    – IE w/o Admin – neither social icons / nor fonts (no “rectangles” instead)
    – Chrome w/o Admin & Firefox w/o Admin – social icons & fonts are replaced by the “rectangles”

    I don’t think so that this is CDN itself issue, might be some small bug within both WP Rocket & Enfold been working together under CDN.

    Any idea of how to fix please?

    #1003697

    Hey DimaP,

    If you notice that font files aren’t loading correctly, or receive the following error in the browser console then you need to modify your server configuration.

    This is because web fonts are subject to Cross-Origin Resource Sharing (CORS). CORS is a way for a remote host to control access to certain types of resources.

    To resolve this issue you need to ensure that your server is sending the correct Access-Control-Allow-Origin header when font files are requested. If you’re unable to modify your server configuration please contact your web host and link them to this post.

    Apache server
    Add the following block to your .htaccess file:

    
    <FilesMatch ".(eot|otf|ttf|woff|woff2)">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
    

    Nginx server
    Add the following location block to your virtual host file (usually within the server directive) and reload Nginx:

    
    location ~* \.(eot|otf|ttf|woff|woff2)$ {
        add_header Access-Control-Allow-Origin *;
    }
    

    Best regards,
    Dude

    #1003719

    Hi, Dude,
    well, I revert back with the question to Cloudway’s dudes, they simply enable CORS policy in 10 mins., then I’ve cleared the WP Rocket cache, now I enjoy a full CDN/WP Rocket functionality!
    Thanks!

    #1004287

    Hi,

    Great, glad it works now :)

    Best regards,
    Dude

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