php - Is it not good to detect devices, operating systems and browsers Versions by User-agents? -


is not detect devices, operating systems , browsers versions user-agents?

can create problem in caching if set expire headers , use wordpress w3 total cache plugin

detecting browser version, via user agent strings, bad idea. amongst other things, approach fails new versions of opera , chrome in version 10+ because of double digit version number.

it's better practice, , more informative, instead use feature detection. often give information you're trying determine.

have @ modernizr library paul irish (of jquery , chrome) , others. mix of techniques html5boilerplate suite needs, whilst being cross browser compatible.

you can use css3 @media-queries adjusting site mobile or small screen devices.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -