pixel

Code Excluding Instructions from WP Website

Steps to Exclude Chat Scripts:

Exclude the chat code from your caching tool. Caching may prevent updates (like chat invitations or behavior settings) from reflecting in real time. Instructions for exclusion for some popular plugins can be found here:

  1. Rocket:
    – Navigate to Settings > WP Rocket > File Optimization.
    – In the Excluded JavaScript Files field, add the URL or keyword, or Domain related to your chat script.

    Load JavaScript deferred

    – For detailed instructions, refer to Exclude files from Load JavaScript Deferred - WP Rocket.

  2. WP Super Cache:
    – Go to Settings > WP Super Cache > Advanced.

    Rejected URL Strings
    – Under Rejected URL Strings, add the Domain or pattern of your chat script to exclude it from caching.

  3. LiteSpeed Cache:
    – Access LiteSpeed Cache > Page Optimization > Tuning.

    LiteSpeed Cache Settings
    – In the JS Excludes field, input the specific Domain name or pattern you wish to exclude.
    – Detailed guidance is available here: LiteSpeed Cache Tuning Tab.

  4. NitroPack:
    –Log in to your NitroPack dashboard.
    –Navigate to Cache Settings > Cache, and scroll to the Excluded Resources section.

    Exclusions
    – Add the full URL/Domain of your chat script under Asset URL/Code.
    – For comprehensive steps, visit Excluded Resources - NitroPack Help Center.

Clear your website’s cache after installing or updating the chat code to ensure changes take effect immediately.

Still, if you believe that Chat Code caching is necessary, please shorten the cache purge time of your plugin/service, ideally to once a week.

Taking these steps ensures your site displays the most up-to-date chat content to visitors.