I’m using $_SERVER[‘HTTP_USER_AGENT’] to detect user’s browser.
When I run the var_dump on my localhost on IE8 it returns:
…compatible; MSIE 8.0; …
But when I upload it to my host (godaddy), I get:
…compatible; MSIE 7.0; …
What’s the problem?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check for the word
TRIDENTin the string. The compatibility-thing is ie in compatibility-mode. Google it if you want to know what it means. However, the term trident is only ie8+.Edit:
Also, you can set a headder/meta-tag to force ie8-mode (no compatibility). However, this will probably not take effect before the second request. Google that too.