Support » Plugin: Comet Cache » Prevent caching when site visited by bot

  • Resolved Johan

    (@hectornado)



    Hello, I’m using translation plugin called Weglot.
    When a span bot is visiting my site the translations do not work.

    Question: Is there a way in Comet Cache to prevent caching when page is visited by a bot ?

    See the answer from the Weglot team:

    The problem is that Weglot detect when a visit on carlsten.se/en comes from a spam bot, Weglot can identify it and it doesn’t do the translations when it’s a spam bot.
    The problem is that your cache is taking the spam bot visit and cache it so later the swedish shows instead of english.
    Do you see what I mean ? We don’t have this kind of problem with other cache plugins, maybe you have option on comet cache to prevent caching when page is visited by a bot ?

    • This topic was modified 1 year, 4 months ago by  Johan.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Raam Dev

    (@raamdev)

    @hectornado Yes, you can use Comet Cache → Plugin Options → User-Agent Exclusion Patterns (see screenshot) to define the User-Agents that should be excluded from caching. The User-Agent is how you’d identify Web Crawlers and Bots. See also this article: Web Crawlers and User-Agents – Top 10 Most Popular

    Johan

    (@hectornado)

    Hi there this is what the developer at Weglot wanted me to add to that field. Can you see if this make sense in your opinion? Thank you.
    /bot|favicon|crawl|facebook|Face|slurp|spider

    Plugin Author Raam Dev

    (@raamdev)

    @hectornado In Comet Cache, those must be entered one-per-line. So in Comet Cache → Plugin Options → User-Agent Exclusion Patterns you would enter that list as follows:

    bot
    favicon
    crawl
    facebook
    Face
    slurp
    spider

    Note also that the field supports a special syntax that allows you to add wildcards. For example, if you wanted to match anything that started with Face, you would enter Face**, which would match Face and Facebook and Facebook / Agent. Please review this article to better understand the syntax.

    • This reply was modified 1 year, 4 months ago by  Raam Dev.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Prevent caching when site visited by bot’ is closed to new replies.