I'm thinking that the only reasons that I can think of to think that you need to capture this information all lead down a very bad path... are you attempting to discover what browser a user is using?
Another useful source of info is the webspeed workshop. There's a section down the left hand side that lists all of the available environment variables.
I'm thinking that the only reasons that I can think of to think that you need to capture this information all lead down a very bad path... are you attempting to discover what browser a user is using?
Yes I need to know the user browser primarily for just monitoring how users are getting the site. Is there a reason this is could 'lead down a very bad path?'
Another useful source of info is the webspeed workshop. There's a section down the left hand side that lists all of the available environment variables.
Usually it means that you are trying to program some behavior based on what sort of browser is running.
If browser = "ie" then do_something_cool; else do_something_different;
That sort of thing is not going to end well.
If you're just tracking what browsers users appear to be using to access your site for statistical purposes then you probably aren't actively creating problem code but you should keep in mind that browsers lie about what the user agent is. (They sort of have to due to IE's long and sordid history of malfeasance.) And even if the browser itself isn't lying the user might be because the user agent is user settable.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.