yjhjerry
Forum Replies Created
-
Update, I replaced the local font-awesome css file with a font-awesome CDN url(hosted by stackpath), now the icon can be rendered correctly…
Hello @vmarko
Thanks for your trouble, really appreciate it.
I disabled AO, removed all files under wp-content/cache/autoptimize/css/, clear Cloudfront cache, now all the static contents can be accessed from CDN.Now a new problem arises, some icons rendered by font-awesome won’t work. I found out that font-awesome uses the gzip file(awesome.min.css.gzip) with CDN enabled, and it won’t render the icon, But after I disabled CDN, font-awesome uses the normal file(awesome.min.css), this is when icons could be rendered correct again.
The gzip file was generated when I tried uploading theme files to the S3 bucket using WTC. I am not an expert of front-end. but is it could be that after the gzip file was received, somehow the browser failed to unzip it…? Or it could be anything else?
Thanks so much again for the time and trouble…
Best regards,
JerryHello @vmarko
Thanks. I’ve added the suggested item. But I am not sure why I should try uploading those files again to AWS(S3?) given that the files are already in the S3 bucket?
Also, can I do the uploading using WTC( under Performance>CDN>General)…?
Hi @vmarko
Thanks for the reply.
I believe one of the things that WTC does behind the scenes is overwrite the origin web server hostname with the CDN hostname, so that when the page loads, static assets could be retrieved using the CDN’s hostname. Problem is that I found in the page source quite a few hostname in the static content url is still my website hostname, they are all under wp-content/themes/theme/images, but some are using CDN hostname, some are not…
I wonder why is this.
Best regards,
JerryHello @vmarko
Thank you so much for the help! it solves my problem.
However, still I found that a few amount of contents are not being accessed from the CDN, but instead again from my site server, as you can see from webpagetest.org https://www.webpagetest.org/performance_optimization.php?test=190814_G7_2591091f31f4a64afdf68c54757ac870&run=1#use_of_cdn
All the “missed” contents are obviously in the S3 bucket, so I wonder what could be the cause of this?
Best regards,
Jerry