• Resolved vtdimitrov

    (@vtdimitrov)


    Hello,

    I have a huge problem with LiteSpeed Cache plugin since my websites are constantly requesting minified css/js files that are missing.

    OpenLiteSpeed 1.6.12
    LiteSpeed Cache v3.0.8.5

    The issue:
    Website is requesting css/js files with wrong names that there are on the server. For example the requests in the browser I have are:

    wp-content/litespeed/cssjs/ecca5.js
    Request Method: GET
    Status Code: 404

    wp-content/litespeed/cssjs/16d73.js
    Request Method: GET
    Status Code: 404

    litespeed/cssjs/9652e.css
    Request Method: GET
    Status Code: 404

    But the files on the webserver are:

    ls -ga wp-content/litespeed/cssjs/
    drwxr-xr-x 2 nobody 4096 May 3 08:54 .
    -rw-r–r– 1 nobody 593026 May 3 08:52 00179.css
    -rw-r–r– 1 nobody 662201 May 3 08:52 3bca0.js
    -rw-r–r– 1 nobody 9959 May 3 08:52 54e63.js
    -rw-r–r– 1 nobody 606692 May 3 08:54 81600.css
    -rw-r–r– 1 nobody 664004 May 3 08:54 e0f94.js

    When I purge the caches, new files are created on the webserver, but the browser is still requesting the old ones.
    This is NOT fixed by disabling LS Cache, NOT fixed restarting openlitespeed or killing all lsphp. Browsers keep requesting the same missing minified js/css and my website is broken. Any help is appreciated.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    When you say purge the caches, which cache you purged ? did you purge all ?

    purge all should clean up both page cache and CSS/JS cache , and generates new file with new names

    please try this :

    1. disable LSCWP

    2. restart OLS

    3. check if everything is fine

    4. now enable LSCWP

    5. restart OLS after restart

    6. check again if everything is fine.

    Best regards,

    Thread Starter vtdimitrov

    (@vtdimitrov)

    Hello,

    Thank you for your reply.
    Sadly, I do not know how and why, but the website is broken even after deleting LS Cache plugin and restarting everything. Really frustrating. I am now downloading LS Cache 2.9.9.2 to test if this can fix the problem.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    You mean even you disabled LSCWP, you still seeing /wp-content/litespeed/cssjs/xxxxx request ?

    check the main request’s header , see if you still seeing “x-litespeed-cache: hit”

    Best regards,

    Thread Starter vtdimitrov

    (@vtdimitrov)

    Hi,

    Yes, I have disabled and deleted everything LSCWP related and still seeing the requests (I have hidden my domain/IP). This is in incognito mode with developers tools and cache disabled:

    General
    Request URL: https://hidden/wp-content/litespeed/cssjs/16d73.js
    Request Method: GET
    Status Code: 404
    Remote Address: hidden
    Referrer Policy: no-referrer-when-downgrade

    Response Headers
    alt-svc: quic=”:443″; ma=2592000; v=”43,46″, h3-Q043=”:443″; ma=2592000, h3-Q046=”:443″; ma=2592000, h3-Q050=”:443″; ma=2592000, h3-25=”:443″; ma=2592000, h3-27=”:443″; ma=2592000
    cache-control: no-cache, must-revalidate, max-age=0
    content-encoding: gzip
    content-type: text/html; charset=UTF-8
    date: Sun, 03 May 2020 14:49:01 GMT
    expires: Wed, 11 Jan 1984 05:00:00 GMT
    link: <https://hidden/wp-json/&gt;; rel=”https://api.w.org/&#8221;
    server: LiteSpeed
    status: 404
    vary: Accept-Encoding
    x-powered-by: PHP/7.3.17

    Request headers
    :authority: hidden
    :method: GET
    :path: /wp-content/litespeed/cssjs/16d73.js
    :scheme: https
    accept: */*
    accept-encoding: gzip, deflate, br
    accept-language: en-US,en;q=0.9,bg;q=0.8
    cache-control: no-cache
    pragma: no-cache
    referer: https://hidden/
    sec-fetch-dest: script
    sec-fetch-mode: no-cors
    sec-fetch-site: same-origin
    user-agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Mobile Safari/537.36

    I have currently uploaded LSCWP 2.9.9.2, issued a ‘Empty Entire Cache’, restarted OLS and currently everything is back to normal.
    I believe this was cached somewhere and it was cached badly. I made a dump of my database and searched for the filenames, but nothing found there. Any idea what could be causing it? I had this issue with 404 on one more website on another OLS server, but there disabling LSCWP fixed the issue.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    But did you see x-litespeed-cache: hit header when you get that error ?

    by design , when LSCWP deactivates , it should also purge the cache , I was thinking it might not have done that properly , as result , you are still viewing the cached page with unexisting files.

    Best regards,

    Thread Starter vtdimitrov

    (@vtdimitrov)

    Hi,

    I have sent you the full request/response headers. This is after I have already disabled and deleted LSCWP 3.0.8.5.

    For the sake of testing and finding what is causing this, I can once again update to 3.0.8.5 and see what happens if you want to.
    Are you caching something new with the ‘domain key’ feature on your servers? Maybe this is the problem?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    No , the one you provided is request to JS file , not the main request, by main request as I mean that your site URL , not static resources’ request.

    Best regards,

    Thread Starter vtdimitrov

    (@vtdimitrov)

    Hello,

    I have installed 3.0.8.5 and managed to break it again. I think this is connected with browser cache and custom headers. I have deleted all custom headers, then purged cache and now seeing 404 errors again.

    As you suggested, even after deactivating LSCWP, I still get x-litespeed-cache: hit header. Why is this and how can I fix it?

    EDIT:

    I have again added custom headers as advised here: https://openlitespeed.org/kb/how-to-set-up-custom-headers/ but using wp-content/litespeed/cssjs/ as URI.
    This did not fix the problem. The only thing that fixed it was to again install version 2.9.9.2 and purge caches from there. I believe v3.0.8.5 is not clearing some caches properly on OLS, even after the plugin is deleted.

    • This reply was modified 4 years, 10 months ago by vtdimitrov.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please join our Slack ?

    I will need more information about it.

    Best regards,

    I am having similar issues,I really want to use this plug in so I would like to know what I need to do to fix my very similar issues.

    Thanks.

    I have the same issue on multiple sites since upgrading to Litespeed cache v3.

    In my case, the server is Openlitespeed.

    I solved my problem with the help of the very friendly and helpful guys at LiteSpeed Technologies Tech Support here:

    [email protected]

    I solved it by going to the terminal and running these commands:

    systemctl restart lsws
    rm -rf /usr/local/lsws/cachedata/*

    I hope that helps!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Website requesting missing minified css/js files causes complete failure’ is closed to new replies.