• Resolved sdawales

    (@sdawales)


    Hello again,

    As I have previously posted, W3TC is a fantastic plugin and I am hoping that I am able to make some changes while keeping the plugin active. I am converting my website into a Progressive Web App and TC has been really helpful. I am running into an issue where best practices seem outside my control unless I am missing something. For example, I am running into an issue like this;

    Error
    ‘content-type’ header should have media type ‘text/javascript’ (not ‘application/x-javascript’)

    https://www.example … 145de653ddfdb3c393338f.js:52:8178

    <script type=”text/javascript” defer=”” src=”https://www.example.com/wp-content/cache/autoptimize/js/autoptimize_3d7dc9d47f145de653ddfdb3c393338f.js”></script&gt;

    Which I guess is loaded by TC in .htaccess.

    # BEGIN W3TC Browser Cache
    <IfModule mod_mime.c>
    AddType text/css .css
    AddType text/x-component .htc
    AddType application/x-javascript .js

    If I modify the .htaccess, I assume it will just get overwritten on flush or build.

    Sorry about the long drawn out question, but is there any way around this? Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm, you could try creating wp-content/AO_htaccess_tmpl and in that template add all AO’s normal .htaccess rules + this code

    
    <IfModule mod_mime.c>
    AddType text/javascript .js
    </IfModule>

    that _might_ override W3TC’s code in the higher .htaccess.

    frank

    Thread Starter sdawales

    (@sdawales)

    Cheers Frank. I’ll work on it and let you know how it goes. Much appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sonarwhal & W3TC’ is closed to new replies.