Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

detecting web browsers

Featured Replies

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

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.");
}

  • 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

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';
 }
}

  • Author

No probs.

 

 

The second string didnt work. just loaded the normal site in a messed up way,

  • 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?

  • 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>

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 by Wickham

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.