Coder Social home page Coder Social logo

Comments (3)

orestbida avatar orestbida commented on August 16, 2024

Hi @PWaddict,

as far as I know, web crawlers directly inspect/download the entire markup of the page. Thus, they completely ignore the fact that there's a modal or not. Instead, it is important that you have proper sitemap and robots.txt files.

You can block crawlers using the following methods:

  • noIndex tag: <meta name="robots" content="noindex">
  • robots.txt
  • ad-hoc client/server side code

You can also check if your website can be analyzed/crawled with online tools like Sureoak Seo Crawler.

from cookieconsent.

lamtonylam avatar lamtonylam commented on August 16, 2024

I had a problem with it.
I've implemented on my cookie notice, what if the device is mobile force_consent is off, and on desktop it is on.

const isMobile = window.matchMedia("only screen and (min-width: 760px)").matches; if (isMobile) { _addClass(html_dom, 'force--consent'); }

https://github.com/lamtonylam/opkh/blob/08b7f7f480084841fd420b8f6bbde8ea99cf3d46/static/keksi.js#L156

This fixed the issue, because google indexes using mobile crawler.

from cookieconsent.

orestbida avatar orestbida commented on August 16, 2024

as of v2.6.0, a new option hide_from_bots was added.

If enabled, the plugin will detect if the current client is a bot/crawler; if it is a bot then it will prevent itself from running, to avoid the indexing of it's own text content and also any possible issue with modals.

from cookieconsent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.