Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 24th Dec 2011, 05:14 PM   #1
Active Warrior
War Room Member
 
Join Date: 2011
Location: Where Warriors Roam
Posts: 93
Thanks: 82
Thanked 13 Times in 13 Posts
Default
User Agent?
Share on: 
fb share twitter share gplus share more share

hey

I read a couple of times comments by Jay Moreno about 'User-Agent'
& while I found alot of info on the subject I still don't 'get it'

can some1 plz explain it to me in plain English :
What it is
What kind of devices it;s best suited for
How I use it properly

Thanks & Happy Holidays

Our Actions Proves What We Really Belive In
LiorN is offline  
Unread 24th Dec 2011, 11:05 PM   #2
Warrior Member
 
Join Date: 2011
Posts: 12
Thanks: 3
Thanked 8 Times in 5 Posts
Default
Re: User Agent?
Share on: 
fb share twitter share gplus share more share

In plain English and oversimplified, the user agent is what kind of computer and software the user is using.

Every time your browser asks a server for a webpage, your browser identifies itself, as well as the operating system of your computer and some other things as well. It sends out a "user agent string" containing this info.

Web developers can access this user agent string and use it to do many things. But for mobile sites, it is common to check the user agent to see if the device is a mobile device, and if it is, serve it mobile content.

It is more specific and accurate to do that by user agent than say, by screen size only.

How to do that is really too much for a post here, but very simply: You have a list of user agents known to be mobile devices. You have a script that detects the user agent, then checks it against your list, and if it matches, then either redirects the user to a mobile page, or changes the content of the page for mobile.

Look up user agent detection and redirection if you want to know more.
M Stacks is offline  
The Following User Says Thank You to M Stacks For This Useful Post:
Unread 25th Dec 2011, 12:33 AM   #3
Old Internet Relic
War Room Member
 
hotlinkz's Avatar
 
Join Date: 2004
Posts: 803
Thanks: 40
Thanked 224 Times in 130 Posts
Default
Re: User Agent?
Share on: 
fb share twitter share gplus share more share

The link below will lead you to a wiki that can help solidify what M Stacks explained.

User agent - Wikipedia, the free encyclopedia

Unless you are planning on doing software programming, you really don't need to get too deep into it. There many "multi-million" dollar marketers who could not explain it to you.

hotlinkz is offline  
The Following User Says Thank You to hotlinkz For This Useful Post:
Unread 25th Dec 2011, 01:54 AM   #4
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,270
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: User Agent?
Share on: 
fb share twitter share gplus share more share

Originally Posted by LiorN View Post

hey

I read a couple of times comments by Jay Moreno about 'User-Agent'
& while I found alot of info on the subject I still don't 'get it'

can some1 plz explain it to me in plain English :
What it is
What kind of devices it;s best suited for
How I use it properly

Thanks & Happy Holidays
Hi LiorN,

To answer your question....

A user agent is a string of variables that identifies what is looking at your website.

Say for example someone is using an iphone to view your desktop website the user agent for an iPhone 4 may look like this:

Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5


We use PHP to get this information but there are many different ways to get it - pretty much every phone browser, every desktop browser, and every search bot have their own unique identifying user agent string.

So for example if someone was looking at your website say with internet explorer the user agent could look like this:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

With this type of information we can choose how to handle the visitor for example the last one we can say do not redirect the visitor to the mobile site if the user agent contains MSIE

Where as with the first example we can say if the user agent contains iPhone redirect the visitor to the mobile website - or better still we can decide the most compatible content to display to the user.

Many people dismiss the importance of user agent awareness however Google just last week introduced their own Google Smartphone Mobile Bots to help find mobile content see this article here:

Official Google Webmaster Central Blog: Introducing smartphone Googlebot-Mobile

With this being said Google now uses three different mobile user agents to detect mobile and include it the search engine ranked pages (SERPS) - how it affects rank its yet to be seen, but it is a clear indication to me at least that User Agent detection is going to play an important place in the development of mobile web sites.

So for example when the Google mobile bot comes to your desktop site you want to detect its user agent and tell it to go visit your mobile site. If you where using some other kinda of detection ie javascript screensize detection Googles Mobile Bot would not get redirected.

I know i am a techie at heart but hopefully this kinda makes sense

If you have any more questions please feel free to ask.

Cheers,

Jay

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 25th Dec 2011, 02:22 AM   #5
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,270
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: User Agent?
Share on: 
fb share twitter share gplus share more share

PS to add...

You would use user agent detection to serve the most compatible content to the device based on its user agent string.

For example:

An iPhone cant display flash, but an Android phone can.
An iPhone supports HTML5 Audio tags but older Android phones don't.
Google Maps For Smartphones works on most smart phone but not all Blackberries - you just get a grey screen.
A lot of feature phones do not support javascript.

If you know what device is viewing your site and you understand the limitations of the device, you can quickly include a work around which gives the end user the best mobile user experience.

For a lot of people building basic mobile sites this is probably overkill - but i have seen a lot of people embedding the ajax based google maps on basic websites which i have found can cause certain Blackberries to freeze. This is a perfect example when user agent detection should be used to deploy the most compatible solution.

I personally think if your are serious about mobile its something certainly to know about and consider or at least the people you outsource too should at least!

Same goes for validation...

Hope that helps.

Jay

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
The Following User Says Thank You to Jay Moreno For This Useful Post:
Unread 25th Dec 2011, 06:09 AM   #6
Active Warrior
War Room Member
 
Join Date: 2011
Location: Where Warriors Roam
Posts: 93
Thanks: 82
Thanked 13 Times in 13 Posts
Default
Re: User Agent?
Share on: 
fb share twitter share gplus share more share

Wow Great info guys
Thanks for the taking the time to answer & elaborating on the subject

I now understand much better this issue & I think it will help other as well

Happy Holidays

Our Actions Proves What We Really Belive In
LiorN is offline  
Closed Thread


Bookmarks

Tags
agent, user


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 04:09 PM.