• Resolved zoonars

    (@zoonars)


    Hello,

    Reading the Getting Started page of WP-Optimize sheds light on the possibility of adding custom cache extensions, and I am trying to figure out how to add a functions.js file from within my theme to a cache exclusion list. Your information section briefly mentions the possibility but I am not sure how to follow through, could I get some help excluding a single .js file from caching?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    I think you’re misunderstanding what the page cache functionality does.
    I saves the html contents of pages to files, and does not affect JavaScript files.
    So that’s the server side caching, for which you can build custom extensions.

    JS files do not need caching server wise (unless if they’re somehow processed).
    On the other hand, WP-Optimize enables you to add browser cache headers, which simply tell the browser how long a file should be cached for.

    Marc.

    Thread Starter zoonars

    (@zoonars)

    Hello and thank you for your response, I appreciate the clarification because at the moment I am investigating an issue with my site’s header caching the mobile version when on desktop mode and the reason I asked this question was a comment made by the theme developer suggesting to exclude a file from caching, here is the exact comment for reference,

    “This [the caching issue] is a matter with the Compress CSS/JS and Cache with the Header Builder.

    Please kindly try to disable it you will see the Header will display correctly.

    You can also try to exclude the following file in your Cache plugin to see any difference:

    wp-content\themes\wr-nitro\assets\woorockets\js\functions.js

    Or all the folder:

    wp-content\themes\wr-nitro\assets\woorockets\js

    Plugin Author David Anderson / Team Updraft

    (@davidanderson)

    WP-Optimize is a page cache. This means it caches the generated HTML when WordPress spits out a page. It doesn’t cache JavaScript files or assets within that page. These things are operating at different levels. So, your correspondent seems a bit confused.

    Thread Starter zoonars

    (@zoonars)

    Your explanation of the difference makes sense, thank you. Ill bring this information to the individual.

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

The topic ‘Javascript file cache exclusion’ is closed to new replies.