Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Passionate Brains

    (@passionatebrains)

    Hi,justunein

    Here in list some of files are hosted on third party servers which we can not cache.
    Remaining files have versions info which is avoided because mostly files with version info can carry some dynamic data or can have critical impact on website if we cache them.
    But you still want to cache these files then you have to remove version info from them which you can do by adding following code to your theme functions.php file which will remove version info and make files to cache-able by plugin.

    function remove_css_js_ver( $src ) {
        if( strpos( $src, '?ver=' ) )
            $src = remove_query_arg( 'ver', $src );
        return $src;
    }
    add_filter( 'style_loader_src', 'remove_css_js_ver', 1000 );
    add_filter( 'script_loader_src', 'remove_css_js_ver', 1000 );  

    Let me know if you still have any issue in caching files.

    Plugin Author Passionate Brains

    (@passionatebrains)

    Hi,

    Hope current answer resolved issue so i am marking present thread as resolved.
    If you still face same issue please open a new topic on support form.

    Regards,
    Parag Patel

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

The topic ‘add expires not working for javascript’ is closed to new replies.