Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6741945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:47:06+00:00 2026-05-26T11:47:06+00:00

As spiders will generally not execute javascript i am thinking of taking one of

  • 0

As spiders will generally not execute javascript i am thinking of taking one of the options below in order to successfully get them to index the content of a website that requires age verification.

My preferred solution:

Checking for a cookie ‘ageverification‘. If it does not exist, add some javascript to
redirect the user to ~/verifyage.aspx which will add the required cookie and redirect the user to their previous page.

Another solution:

As above, but do not redirect the user. Instead, if the cookie doesnt exist, draw the age verification form ‘over the top’ of the existing page.

Another solution:

Add a ‘Yes I am over 18’ anchor link that a crawler can follow. I am slightly skeptical over the legality of this.

Any insight or ideas greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:47:06+00:00Added an answer on May 26, 2026 at 11:47 am

    What I do – I store age verification in session data. If the session variable does not exist, the server appends a div to the end of the body (after the footer) with the click to verify or click to exit. I use CSS to have it cover the content.

    For the css – I use:

    display: block; width: 100%; height: 100%; position: fixed; top: 0px; left: 0px; z-index: 9999;
    

    That causes the div the cover all other content in a graphical browser even though it is placed at the very end of the body.

    For users without JS enabled, the “Enter” link points to a web page that sets the session variable and returns the user to the page they requested. That results in two page loads of the browser for them to get to the content they want which is not ideal, but it is the only way to do it for non JS enabled browsers.

    For JS enabled browsers, a small JavaScript is attached to the page that will change the “Enter” link href link to # and attach a very basic function to the click event, so that clicking on Enter triggers the use XMLHttpRequest to tell the server the person clicked “Enter”. The server then updates the session and responds to the XMLHttpRequest with a 200 OK response, triggering the JavaScript to hide the age verification div covering the content. Thus the session is updated so the server knows the user verified the age and the user gets to see the content they wanted with no page reloading in the browser, a much better user experience.

    The age verification thus works without JavaScript by sending the user to the verify page the stateless way or in a much friendlier way with JavaScript.

    When a search spider crawls the site, it gets the age verification div on every page because a spider will not have the necessary session variable set, but since the div is at the very end of the html body the spider still indexes the real content first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

below I have a query that will get the most common user agents for
I'm building a spider which will traverse various sites and data mining them. Since
Are there any tools that will spider an asp.net website and create a static
Do any search engine [spiders] take issue with escaped special characters in a page's
You may have seen JavaScript sliders before: http://dev.jquery.com/view/tags/ui/1.5b2/demos/ui.slider.html What I'm envisioning is a circular
I need to create a user configurable web spider/crawler, and I'm thinking about using
AFAIK, the rel=nofollow attribute on links instruct search engines not to follow through the
I would like to insert multible sliders in one page. I have a block
I'm creating a website that will have the admin upload documents available only to
I am trying to detect is a visitor is human or not. I just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.