Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Determine Whether the Origin of the Request is a Crawler

Learn a quick way to determine if a request has come from a crawler.


advertisement

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(); 
}


 

Visit the DevX Tip Bank

 



   
Srinath M. S. says: "I would love to leave a footprint in this flat world."
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date