StackPath CDN
-
When I try to activate the CDN URL rewrite everything breaks. The site is not rendered correctly. Any ideas?
The page I need help with: [log in to see the link]
-
@adistirom are you saying that you used “//q8g8r6v2.stackpathcdn.com” as a CNAME in both input fields and none of the Asset CleanUp’s optimized files were loading? If that’s the case, there could be a bug somewhere or a plugin incompatibility. Please check the image I’ve added here: https://ibb.co/GP8JYZT – is that the change you made?
Also, I’ve checked the source code of your website and I have a suspicion that the problem could be from the /mainsite/ that you have in the URL (it might be skipped).
I made a few tests and I noticed that https://q8g8r6v2.stackpathcdn.com/wp-content/cache/asset-cleanup/js/item/b1dc3fb47cf00c4c5c86346487ce5df1-vb882e63a139948e21a3a1bae6747225333276421.js which is the replacement result is not working. It returns a 404 page. However, when https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/cache/asset-cleanup/js/item/b1dc3fb47cf00c4c5c86346487ce5df1-vb882e63a139948e21a3a1bae6747225333276421.js is used, it does work fine.
I’ll do further tests and have this fixed so the right URL (WordPress one) and not the site URL (root one) is used.
My apologies for this inconvenience & this will be fixed as soon as possible!
PS: If you will ever be interested in the Pro version, I can give you a hefty discount as a thank you for reporting this bug that could affect others.
@adistirom I found the solution for this situation. I’m not sure of your WordPress/CDN configuration unless I will get more information about it, but from what I checked, your issue can be fixed 100% by using a different CNAME. Here’s what you need to do:
1) Go to “CDN: Rewrite assets URLs” from plugin’s “Settings”.
2) Re-enable “Enable CDN URL rewrite?” and in both fields (“For Stylesheet (.css) Files:” & “For JavaScript (.js) Files:”) use the following CNAME: //q8g8r6v2.stackpathcdn.com/mainsite (currently you have it without /mainsite)This is because your website’s URL is different than the URL to the WordPress installation and where the files are located (e.g. /mainsite/wp-content/themes/storefront/style.css?ver=2.5.5). If you will ever stop using “mainsite” or rename it to something else, then you need to update the CNAME accordingly.
In my debugging tests, this has been working fine on your end.
By the way, after I checked your website’s homepage, it looks like you have plenty of CSS files that aren’t needed there and if you unloaded them, you can decrease the total page size and increase your page speed score. Here are the ones that seem to be completely unused:
- https://c0.wp.com/p/woocommerce/3.9.3/packages/woocommerce-blocks/build/style.css
- https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/themes/storefront/assets/css/base/gutenberg-blocks.css?ver=2.5.5
- https://c0.wp.com/c/5.4.1/wp-includes/css/dist/block-library/theme.min.css
- https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/themes/storefront/assets/css/jetpack/widgets.css?ver=2.5.5
- https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/plugins/storefront-footer-bar/assets/css/style.css?ver=5.4.1
- https://q8g8r6v2.stackpathcdn.com/mainsite/wp-content/plugins/controlled-admin-access/public/css/controlled-admin-access-public.css?ver=1.0.0
Consider enabling “Test Mode” if you worry you might break something during the unloading process and check how your page looks after each of the unloadings on both desktop and mobile view. Once all is good, you would have saved a few hundred KB of extra unused CSS which I believe it’s worth the time 😉
Thanks! It works.
@adistirom Awesome! I hope you’ll find the plugin useful in the long term! If you’re happy with it overall it would be great if you can spare a minute and leave a quick review about it here: https://ww.wp.xz.cn/support/plugin/wp-asset-clean-up/reviews/#new-post
The topic ‘StackPath CDN’ is closed to new replies.