Answer the question
In order to leave comments, you need to log in
How to disable indexing of modal window content?
The site has a modal block that is shown when entering and visiting one of the sections to warn that the material on the site has an age limit. How to disable indexing of this modal block?
Answer the question
In order to leave comments, you need to log in
It is necessary to load the contents of the modal window dynamically, when it is opened.
Usually, scripts that implement modal windows either already have such an opportunity through the settings, or they generate an event by which you can execute a JS function that will load the content into the desired element with an ajax request.
You can add text to the modal block dynamically with a script. Then it won't get indexed. For example, using Ajax to get text from a file for which indexing is prohibited.
You can insert a warning with a pretty picture or display it through Canvas .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question