Title: Deleted CSS files return code 200
Last modified: August 9, 2019

---

# Deleted CSS files return code 200

 *  Resolved [Grubyy](https://wordpress.org/support/users/grubyy/)
 * (@grubyy)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/deleted-css-files-return-code-200/)
 * Hello,
 * I have been using the LS Cache server for several months, currently v2.9.8.4.
   Generally your plugin works very nice, but I found one problem, that could be
   wasting googlebot crawl budget. If I delete all cache in advanced options or 
   I choose option clear all LS Cache – CSS / JS, deleted, empty files still return
   the HTTP 200 code. After a few minutes in cache catalog they appear again instead
   returns the 404 code. The second fact, if I change file name, for example:
    currently:
   domain.com/min/51573.css after: domain.com/min/test.css After a few minutes file
   test.css will apear in cache directory on my server. In the server log files 
   you can see that Googlebot visits old files/url adresses from its memory as long
   as they retun 200 status code. There are a two solutions, deleted files should
   retun 404 code or better, recources should have constant url adress for all the
   time.
 * How can i fix it?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/deleted-css-files-return-code-200/#post-11818987)
 * 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](https://wordpress.org/support/users/grubyy/)
 * (@grubyy)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/deleted-css-files-return-code-200/#post-11819082)
 * 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](https://wordpress.org/support/users/grubyy/).
    -  This reply was modified 6 years, 9 months ago by [Grubyy](https://wordpress.org/support/users/grubyy/).
    -  This reply was modified 6 years, 9 months ago by [Grubyy](https://wordpress.org/support/users/grubyy/).
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/deleted-css-files-return-code-200/#post-11819097)
 * Hi,
 * Yes, I see that random /min/xxxxx.css returns 200.
 * I will run some test and check.
 * Best regards,
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/deleted-css-files-return-code-200/#post-11819241)
 * 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](https://wordpress.org/support/users/grubyy/)
 * (@grubyy)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/deleted-css-files-return-code-200/#post-11819711)
 * 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](https://wordpress.org/support/users/grubyy/).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Deleted CSS files return code 200’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Grubyy](https://wordpress.org/support/users/grubyy/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/deleted-css-files-return-code-200/#post-11819711)
 * Status: resolved