• Resolved tendenzechic

    (@tendenzeshabbychic)


    Hi, I have a problem with the joinchat plugin, after the last update the WhatsApp-shaped icon does not appear correctly (see link) to old visitors.

    I tried clearing the cache, excluding both the css and dedicated js of the plugin but the problem persists. the browser continues to provide the old version of the css and js generating.

    https://prnt.sc/Ew-7ZfHWT2Db

    This only happens for old visitors

    If I disable litespeed the problem doesn’t happen

    I contacted joinchat support and they responded

    It’s very likely that the issue is caused by an optimization plugin that removes the version query string (?ver=...) from the CSS files.

    When the version parameter is stripped, browsers may keep using a cached version of the file, thinking it hasn’t changed — even though it actually has. This would explain why only returning users (with an old cache) are seeing the broken icon.

    You can check your optimization or caching plugin settings and disable the option that removes version parameters from CSS/JS files. That way, returning users will get the updated files after updates like the one from 5.x.x to 6.0.4.

    Can you help me?

    Report Number: MPIHIRCQ

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

    (@qtwrk)

    please go to Page Optm -> HTML setting -> set Remove Query Strings to OFF , purge all , and see how it goes

    Thread Starter tendenzechic

    (@tendenzeshabbychic)

    Hi, the problem seems to have been solved, but when I spoke to the hosting provider, they pointed out to me that it wasn’t the best choice… Is there an alternative way?

    Plugin Support litetim

    (@litetim)

    @tendenzeshabbychic When you said that you cleaned cache did you tried Purge all – CSS/JS cache too?

    Plugin Support qtwrk

    (@qtwrk)

    &_litespeed_rm_qs=0

    you can append this query string to your specific CSS that need to retain the query string, this one will tell our plugin to bypass and not to remove the query string of this specific CSS

    Thread Starter tendenzechic

    (@tendenzeshabbychic)

    I tried to insert joinchat.min.js&_litespeed_rm_qs=0 in the js field excluding this and in the css tab this joinchat.min.css&_litespeed_rm_qs=0

    cleared all caches but are not excluded
    https://prnt.sc/BD12PkxkJH16

    Plugin Support qtwrk

    (@qtwrk)

    please try go to Page Optm -> Tuning -CSS -> CSS exclude , add joinchat , save and purge all

    Thread Starter tendenzechic

    (@tendenzeshabbychic)

    it works but the version is not inserted

    https://prnt.sc/OER1r7iR-mTY

    Plugin Support qtwrk

    (@qtwrk)

    function modify_joinchat_script( $content ) {
    return preg_replace(
    '/joinchat\.min\.js\?ver=([^"]+)"/i',
    'joinchat.min.js?ver=$1&_litespeed_rm_qs=0"',
    $content
    );
    }
    add_filter( 'litespeed_buffer_before', 'modify_joinchat_script', 0 );

    now add this to your theme’s functions.php and purge all

    Thread Starter tendenzechic

    (@tendenzeshabbychic)

    Hi, I tried to insert this snippet with codesnippet but it replies:
    Failed to update snippet. Request failed with status code 404

    Plugin Support qtwrk

    (@qtwrk)

    that’s code snippet issue … I usually do with theme’s functions.php , which I know for sure it works…

    Thread Starter tendenzechic

    (@tendenzeshabbychic)

    I inserted the snippet in the function file of the active theme, I emptied the entire cache but the result does not change, the version is not displayed.

    https://prnt.sc/b5x6FE8jcOku

    While here with litespeed disabled the version is loaded

    https://prnt.sc/bwswL0PjKGa0

    Plugin Support qtwrk

    (@qtwrk)


    function update_joinchat_version( $content ) {
    if ( defined( 'JOINCHAT_VERSION' ) ) {
    $content = str_replace(
    'joinchat.min.js',
    'joinchat.min.js?ver=' . JOINCHAT_VERSION,
    $content
    );
    }
    return $content;
    }
    add_filter( 'litespeed_buffer_after', 'update_joinchat_version', 10);

    okay , please try this , and purge all

    Thread Starter tendenzechic

    (@tendenzeshabbychic)

    ok, it works for javascript.
    Should I do the same with css too?

    After updating the snippet it automatically updates with the current version of the plugin:
    function update_joinchat_version( $content ) {
    if ( defined( ‘JOINCHAT_VERSION’ ) ) {
    $content = str_replace(
    ‘joinchat.min.js?ver=6.0.5’,
    ‘joinchat.min.js?ver=6.0.5?ver=’ . JOINCHAT_VERSION,
    $content
    );
    }
    return $content;
    }
    add_filter( ‘litespeed_buffer_after’, ‘update_joinchat_version’, 10);

    But what happens if the plugin is updated?

    Plugin Support qtwrk

    (@qtwrk)

    huh ? my code will take care of plugin version by using its constant JOINCHAT_VERSION

    Thread Starter tendenzechic

    (@tendenzeshabbychic)

    Everything is clear. I thank you.

    What about CSS instead?

Viewing 15 replies - 1 through 15 (of 19 total)

The topic ‘Plugin conflict css cache problem’ is closed to new replies.