ProgramPotato Posted May 21, 2012 Share Posted May 21, 2012 Hi, I know there is a way to detect browsers with javascript, and i would like to have this in my website, but what I find on the internet doesn't give me exactly what I want. I want a sentence to display only in Chrome and Safari: Thank you for using Chrome or Safari for browsing this website. You are expiriencing this page the best it can be! And i want every other browser to display this:This website works best if using <a href="www.google.com/chrome">Chrome</a> or <a href="www.apple.com/safari">Safari</a>. Please consider using them. Hope it works out! Link to comment Share on other sites More sharing options...
Ingolme Posted May 21, 2012 Share Posted May 21, 2012 There is no way to detect what browser the user has. And it's the mark of a bad web developer to ask the users to use a different browser. If you can't get the page to look right in Firefox or Opera then you must have done something wrong. Link to comment Share on other sites More sharing options...
ProgramPotato Posted May 21, 2012 Author Share Posted May 21, 2012 (edited) There is no way to detect what browser the user has. And it's the mark of a bad web developer to ask the users to use a different browser. If you can't get the page to look right in Firefox or Opera then you must have done something wrong. Thanks. It's not like i have a game that only works in IE or something. I should just let it go. And there is a way, btw. Edited May 21, 2012 by ProgramPotato Link to comment Share on other sites More sharing options...
Ingolme Posted May 21, 2012 Share Posted May 21, 2012 There's no fool-proof way, because the User Agent can be faked. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now