• Resolved aristotelisj

    (@aristotelisj)


    Similar to as mentioned here: https://www.ads-software.com/support/topic/failed-to-load-resource-the-server-responded-with-a-status-of-403-6/

    Errors & warnings as they appear in the console:

    Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://cdn1.domain.com/wp-content/cache/autoptimize/css/autoptimize_1e1ae9672ab870fae1ea2a5a9b0c1ab5.css".
    (index):1 Refused to apply style from 'https://www.domain.com/wp-content/cache/autoptimize/css/autoptimize_1e1ae9672ab870fae1ea2a5a9b0c1ab5.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
    autoptimize_b598d62d948cc70a9aef58605e043bbc.js:2 JQMIGRATE: Migrate is installed, version 3.3.2
    (index):1 The resource https://www.domain.com/wp-content/themes/goya/assets/icons/theme-icons/fonts/et-icon.woff?rkbvvo was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally.
    (index):1 The resource https://www.domain.com/wp-content/themes/goya-child/fonts/FuturaStd-Book.woff2 was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate <code>as</code> value and it is preloaded intentionally.

    The above do not normally appear. They only appear in the following situation.
    1. You go to W3TC and purge all caches.
    2. If you notice that the autoptimize cache was also deleted then the problem happens.
    If the autoptimize cache was not deleted, the problem does not happen.
    You can empty the autoptimize cache also to force this to happen.
    3. Immediately you CTRL-F5 your home page.
    4. The above messages appear
    5. 4x autoptimize.js files appear
    autoptimize_xxx.js 301 cdn1.domain.com script/redirect (index)
    red autoptimize_xxx.js 410 https://www.domain.com script (cdn1.domain.com/…/autoptimize_xxx.js)
    autoptimize_xxx.js 301 cdn1.domain.com script/redirect (index)
    autoptimize_xxx.js 200 https://www.domain.com script (cdn1.domain.com/…/autoptimize_xxx.js)
    6. 2x autoptimize.css files appear
    autoptimize_xxx.css 301 cdn1.domain.com stylesheet/redirect (index)
    red autoptimize_xxx.css (canceled) https://www.domain.com stylesheet (cdn1.domain.com/…/autoptimize_xxx.css)
    7. When I right click the js and css files and open in new tab, I can see the contents of my /journal page. Weird.

    No fallback files show up.
    When you CTRL-F5 again after a few seconds everything is back to normal.

    How to avoid this problem:
    1. Follow step 1 & 2 above.
    2. Start your stop watch and wait 15s. Do CTRL-F5 on your home page.
    The problem does not happen!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @aristotelisj

    Thank you for the detailed information and I am happy to help.
    This is not regular (common) behavior. I’ve tested this and I cannot replicate the issue. Since the W3TC cache is cleared mediately, it appears that you may have another layer of caching like some kind of server-side caching that is set like the nginx micro cache which refreshes every 15 seconds or so.
    Thanks!

    Thread Starter aristotelisj

    (@aristotelisj)

    I do not have another caching system – only w3tc & autoptimize.
    This happens as mentioned above.
    You may need to try a few times to catch it. As soon as you purge all W3TC caches (watch the circle going round the favicon of the tab-title), ALT-TAB quickly to another browser and CTRL-F5.
    When this happens, /public_html/wp-content/cache/page_enhanced/mydomain.com/wp-content/cache/autoptimize/css/autoptimize_9e40abce223e270667c109cb356a76b4.css
    will contain _index_ssl.html with the contents of a page on your site (mine is /journal).
    Also /public_html/wp-content/cache/page_enhanced/mydomain.com/wp-content/cache/autoptimize/js/autoptimize_9e40abce223e270667c109cb356a76b4.js
    will contain _index_ssl.html with the contents of a page on your site (mine is /journal).
    Both 148KB.
    Under normal circumstances these files are disabled (_index_ssl.html_old).
    This is not a serious problem and only happens if you access the page too quickly after the cache is purged. A few seconds later it gets fixed when you CTRL-F5 a few times.
    If you want I can give you access so you can see it yourself.
    Let me know.

    Use only w3tc, because autoptimize – bugs and conflicts. You cannot use these two plugins at the same time!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘W3TC & autoptimize – “Refused to apply style”’ is closed to new replies.