• Regularly, once a month, the site’s CSS-style layout crashes and numerous errors appear in the browser console:

    The resource from “/wp-content/litespeed/js/fad5a5209149c25cf94bb164ee74224f.js?ver=894d8” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)

    The resource from “/wp-content/litespeed/css/a7fce63fe22174b3ad57c6bd0a5c8102.css?ver=894d8” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

    When we follow these links, the server returns a 404. So, is there a problem with the cache update?

    After logging into the admin panel and clearing the cache, this problem disappears.

    Can you advise me what this problem can be related to in your opinion?

    In the LiteSpeed plugin settings, combining styles and scripts is enabled.

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

    (@qtwrk)

    please provide the report number , you can get it in toolbox -> report -> click “send to LiteSpeed”

    Thread Starter KR. Laboratories

    (@krashlab)

    Report number: XDWFGXTU

    Plugin Support qtwrk

    (@qtwrk)

    hmmmm, I don’t see any immediate reason , do you have any way to reproduce it ? if it’s once a month , any specific date or time , or action , when that happen ?

    Thread Starter KR. Laboratories

    (@krashlab)

    [14/Aug/2023:02:49:04 +0000] “GET /wp-content/litespeed/js/122a1aa4cf141f4b729b819f2c8b5cc4.js?ver=894d8 HTTP/2” 404 705
    [14/Aug/2023:02:49:04 +0000] “GET /wp-content/litespeed/css/fc60e8d00be11baf933646794d3d3391.css?ver=894d8 HTTP/2” 404 705
    [14/Aug/2023:02:49:05 +0000] “GET /wp-content/litespeed/css/7fe525c03358a56785eb0543faa5f612.css?ver=894d8 HTTP/2” 404 705
    [14/Aug/2023:02:49:05 +0000] “GET /wp-content/litespeed/js/cfc2b583f5459d49a5d79473328345ee.js?ver=894d8 HTTP/2” 404 705
    [14/Aug/2023:02:49:06 +0000] “GET /wp-content/litespeed/css/b07116c17f8645fe8f8980f2aca92687.css?ver=894d8 HTTP/2” 404 705
    [14/Aug/2023:02:49:06 +0000] “GET /wp-content/litespeed/js/fedd9590d8dbff14ce5a64374f1ce301.js?ver=894d8 HTTP/2” 404 705
    [14/Aug/2023:02:49:07 +0000] “GET /wp-content/litespeed/js/fedd9590d8dbff14ce5a64374f1ce301.js?ver=894d8 HTTP/2” 404 705

    I also don’t know why one day these cached versions of files started returning 404s, and the layout of the site was damaged.

    Plugin Support qtwrk

    (@qtwrk)

    the case is that , when page cache is updated , it will clean up all js/css files , and sometimes it will generate a new filename

    while in your case, for whatever reason, the page cache is not wiped cleanly , it is still linked to old js/css files that no longer exists, therefore end up in 404

    please try this , put a cache-control: no-cache, max-age=0, must-revalidate, no-store header to your pages, this will disable browser cache, just in case

    then , if you have wp cron from system cron job to trigger it, please make sure you are using wget/curl way to trigger, instead of CLI way.

    Thread Starter KR. Laboratories

    (@krashlab)

    We have activated the server scheduler cronjob, but instead wget/curl used php command.
    Thank you for your recommendations, we will try to apply them and then let you know the result.

    Thread Starter KR. Laboratories

    (@krashlab)

    Today our website has stopped rendering again through an error:

    e06081caa22b174d81151dfe30d7da2d.js:1 Failed to load resource: the server responded with a status of 404 ()
    Refused to execute script from ‘https://kr-labs.com.ua/wp-content/litespeed/js/e06081caa22b174d81151dfe30d7da2d.js?ver=5d4ed’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.

    Screenshots:
    https://imgur.com/Zml80hd.png
    https://imgur.com/JExrbAr.png

    Report ID: LXLMFRVE

    Why LiteSpeed does not update the old cache ??? Cronjob enabled and working.

    Only complete manual clean cache solves this problem. But it should not be. Either there is some reason on our side or on the side of the plugin …

    And it happens periodically. Can it be an attack with the intercepting or breakdown of LITESPEED cache?

    We finally try follow this guide: https://openlitespeed.org/kb/how-to-set-up-custom-headers/

    Thread Starter KR. Laboratories

    (@krashlab)

    After 1 month, the situation repeated itself. Today we found out that the site was not loading due to a Litespeed error:

    The resource from “https://kr-labs.com.ua/wp-content/litespeed/js/323f74d7b8cdf3323ac88876f88d7360.js?ver=b87a8” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

    If we don’t get proper support and a solution to this issue, we will probably be forced to remove the plugin. I suspect that this caching plugin is vulnerable to some attacks with MIME type.

    P.S. And again, after manually clearing the cache, the problem disappeared. I ask you why?

    Plugin Support qtwrk

    (@qtwrk)

    no, it’s not about attack , the case I have explained, when page cache and JS/CSS cache out of sync , this happens , I don’t see you have put the header that disables the browser cache though

    and also , please keep the debug log enabled to admin IP , track the purge call , let’s see what was the purge log when this happens or what triggered the purge.

    and also , please provide the latest report number again.

    Thread Starter KR. Laboratories

    (@krashlab)

    Report ID: PBYPAFVK

    Just now we added HTTP-header, you can check it here:
    https://securityheaders.com/?q=https%3A%2F%2Fkr-labs.com.ua&followRedirects=on

    Thanks for recommendation:
    “…and also , please keep the debug log enabled to admin IP , track the purge call , let’s see what was the purge log when this happens or what triggered the purge”.

    Hope it helps, because really tired from this.

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

The topic ‘The resource was blocked due to MIME type’ is closed to new replies.