Home » Tip Bank » Web Development
  • Email Article
  • Comment on this Article
  • Share Article
    • Digg
    • del.icio.us
    • Newvine
    • furl
    • StumbleUpon
    • BlinkList
    • Newsvine
    • Magnolia
    • Facebook
    • Tailrank
    • Slashdot
    • Technorati
    • Google Bookmarks
    • Yahoo Favorites
    • Windows Live
    • Ask
Language: .NET
Expertise: Advanced
May 9, 2017

Determine Whether the Origin of the Request is a Crawler

A situation may arise in which you would need to hide certain sections of your page from crawlers or determine what actions to take based on the referrer of the Request. You can use the HttpCapabilitiesBase.Crawler property to determine this.

In the sample below, the Request.Browser object represents HttpCapabilitiesBase object.

if (Request.Browser.Crawler)
{ 
  HideCertainSections(); 
}
Srinath M S
 
Submit a Tip
Browse "Web Development" Tips
Browse All Tips
javascriptkit.com
codecademy.com