Plugin Support
qtwrk
(@qtwrk)
Hi,
Could you please check the HTTP header on these /min/XXXXX file ?
In certain case , this file will be served from server cache system , instead of load as static file from /wp-content/cache/css(js)/xxxxx.
Also could you please try “purge all” and/or “purge LS cache” button and see if this also happens ?
Best regards,
Thread Starter
Grubyy
(@grubyy)
Thanks for a quick reply.
I checked HTTP headers with a several tools and all of them shows that codes status are 200.
HTTP / 1.0 200 OK =>
Content-Type => text / css; charset = utf-8
Cache-Control => public, max-age = 2592000
Expires => Sun, 08 Sep 2019 21:06:24 GMT
Etag => “33676-1565384784 ;;;”
X-Litespeed-Cache => miss
Content-Length => 0
Date => Fri, 09 Aug 2019 21:06:24 GMT
Server => LiteSpeed
Alt-Svc => quic = “: 443”; a = 2592000; v = “35,39,43,44”
Connection => close
If i check random file name /min/xyz.css its also 200.
I used “purge all” and / or “purge LS cache” options and after that cache directory on my server was empty for a several minutes. I checked that CSS file in header tag has a new name and after 10 minutes i checked status for previous file – it was still 200. Ten minutes later previous CSS file was apperead, but it’s acctually empty (0KB).
Edit:
It’s the same situation with JS files.
-
This reply was modified 6 years, 9 months ago by
Grubyy.
-
This reply was modified 6 years, 9 months ago by
Grubyy.
-
This reply was modified 6 years, 9 months ago by
Grubyy.
Plugin Support
qtwrk
(@qtwrk)
Hi,
Yes, I see that random /min/xxxxx.css returns 200.
I will run some test and check.
Best regards,
Plugin Support
qtwrk
(@qtwrk)
Hi,
Please edit file /wp-content/plugins/litespeed-cache/inc/optimize.class.php
add following code before line 201
if ( ! $content ) {
LiteSpeed_Cache_Log::debug( '[Optm] Static file generation bypassed due to empty' ) ;
return ;
}
Then empty file or deleted ones should be 404
Please let us know how it goes.
Best regards,
Thread Starter
Grubyy
(@grubyy)
Hi,
I added your code in the file. After that, I changed the file name to a random combination and now they return 404, and it looks like that random files have not been added in cache directory.
Thanks a lot!
-
This reply was modified 6 years, 9 months ago by
Grubyy.