Should I redirect minified javascript that shows as 404?

Sutra

Investor and Business Mentor
BuSo Pro
Joined
Oct 28, 2015
Messages
840
Likes
918
Degree
3
Hola hola,

First, I use a cacheing plugin to improve site speed.

Second, to improve speed more, I set up a CDN to serve images and assets from Cloudfront.

After I set up the CDN, I ran Screaming Frog. It shows a bunch of 404 errors for the minified script. For example:

https://domain.com/wp-content/cache/min/2/G9aG9ca2158e4w159d72bd6ec6f2a379.js not found.

Should I redirect those URL's with a 301? Or do something else?
 
I would figure out where screaming frog was picking up those url's and get rid of them.
 
I would figure out where screaming frog was picking up those url's and get rid of them.
They are from the wp rocket minification process. Originally the minified files were on my domain. But now that I'm using a cdn the files are located on a subdomain, thus the changed url and 404 errors.

I'm not sure what you mean about getting rid of them. Can you clarify?
 
Screaming frog is just a crawler so whatever you used to manage your cache before you got the cdn is placing that 404 js url in your html.

Just let the cdn manage all your cache and disable whatever you were using before. That should fix your 404 problem. You dont need both anyway.
 
@Calamari Just so I'm clear, are you saying I should completely stop using my caching plugin (WPRocket)? Or are you saying that I should keep using the cacheing plugin but I should disable the minification options, i.e. Minify HTML, Combine Google Fonts files, Minify CSS files, Combine CSS files, Minify JavaScript files, etc.?
 
@Calamari Just so I'm clear, are you saying I should completely stop using my caching plugin (WPRocket)? Or are you saying that I should keep using the cacheing plugin but I should disable the minification options, i.e. Minify HTML, Combine Google Fonts files, Minify CSS files, Combine CSS files, Minify JavaScript files, etc.?

As far as I know there's nothing that WPRocket can do that a decent CDN cannot. I'd get rid of WPRocket completely.
 
WP Rocket is server side caching. Your CDN most likely isn't serving your web pages themselves, just the assets on them. I'd keep your caching.

I'd turn off the minification though. The CDN is missing scooping up that minification file, and if it's serving a 404 then it doesn't need to be there at all. If you clear your cache, that might fix it. Otherwise I'd turn off minification.
 
Back