July 31, 201214 yr Afternoon all. Just completed browser testing for my works new website. works well. Any guess's which one doesnt support the design at all.. INTERNET EXPLORER 6 & 7 so, im not going to design the site for these browsers. I want to put something in that detects the browser, and tells the end user to upgrade. Can i have some suggestions please. Thanks Craig
July 31, 201214 yr Are you using jQuery on the site already? If so: if ($.browser.msie && $.browser.version < { // Whatever you want to happen alert("Get a real browser."); }
July 31, 201214 yr Author Loved the "Get a real browser" brilliant. Plus one! Thank you. If i wanted then to redirect them to an index2.html where i can store a basic template for my site with contact details on how would i do that, once they click ok? Thanks
July 31, 201214 yr if ($.browser.msie && $.browser.version < { if (confirm("You're using an old version of IE. Press Ok to view my contact details, or cancel to upgrade your browser.")){ window.location = 'http://yourwebsite.com/index2.html'; } else { //Do something else window.location = 'http://google.com/chrome'; } }
August 1, 201214 yr Author No probs. The second string didnt work. just loaded the normal site in a messed up way,
August 1, 201214 yr Author coming back to this i think i want to remove the alert and just redirect if ($.browser.msie && $.browser.version < { // Whatever you want to happen location('browsererror.html'); } Is that right?
August 1, 201214 yr Author just incase anyone is wondering; <script type="text/javascript"> if ($.browser.msie && $.browser.version < { // Whatever you want to happen window.location = 'http://www.arporter.co.uk/browsererror.html'; } </script>
August 1, 201214 yr Any guess's which one doesnt support the design at all.. INTERNET EXPLORER 6 & 7 so, im not going to design the site for these browsers. I want to put something in that detects the browser, and tells the end user to upgrade. You could use a conditional comment for lt IE 8 (less than IE8) and a class style that is inside the cc and also in your main styesheet with display: none; and message text with that class in the body markup, then no javascript is used (but it won't redirect unless you have a link in the text). Edited August 1, 201214 yr by Wickham
Create an account or sign in to comment