User-Agents: Cloak and Dagger for Web Sites - Part 1

by Scott Allen

Intro to User-Agents

In James Bond movies and on spy shows like Alias, you hear of spy organizations like the CIA, or old Russian KGB, using “agents”. For me, the word “agent” always brings spy stories to mind. Or it might bring to mind The Matrix, where Neo has to fight “agents”.

agents

Well there is a tiny element of that in web design. Here’s how…In an earlier post, I mentioned the need to turn dynamic url’s into search engine friendly url’s. One necessary technique is to code your site so that it clandestinely detects who is visiting your site and behaves accordingly.

I want to take a second to differentiate this from cloaking which is is a search engine optimization technique in which the content presented to the search engine spider is different from that presented to the users’ browser.

What I am talking about is the detection of User-Agent HTTP header of whoever/whatever is requesting the page. Every browser has a user agent, every search engine spider/bot has one, and many other programs/entities do. This can be done on the server side (recommended) in a dynamic scripting language such as PHP or ASP, and on the client side in JavaScript.

After you set your pages to sniff out the User-Agent, you can test your page’s reaction to it to see if behaves properly. You can do this at WannaBrowser.com. It will spoof (fake) the User-Agent id sent to the page so you can see how it reacts with each User-Agent you are testing for.

Ok, well that should do for now…I’ll get more in-depth in a later post.

Tags:
|

Bookmark or Share with Friends: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • StumbleUpon
  • del.icio.us
  • Sphinn
  • Digg
  • Reddit


If you enjoyed this post, make sure you subscribe to the RSS feed!


Email This to a Friend Email This to a Friend

Print This Post Print This Post


Related Posts:

  • What Is My User-Agent?
  • Detect User-Agents: Cloak and Dagger for Web Sites - Part 2
  • Cyber-Surveillance and Internet Data-Mining
  • Search Engine Friendly URLs and .htaccess / mod_rewrite - Part 1
  • Detailed Browser Detection


  • About This Entry