-
AuthorPosts
-
August 30, 2018 at 1:54 pm #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?
August 30, 2018 at 4:00 pm #1003697Hey 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,
DudeAugust 30, 2018 at 5:02 pm #1003719Hi, 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!September 1, 2018 at 9:06 am #1004287Hi,
Great, glad it works now :)
Best regards,
Dude -
AuthorPosts
- You must be logged in to reply to this topic.