Forums / General / how to filter access to certain browsers ?

how to filter access to certain browsers ?

Author Message

Alexandre Cunha

Monday 03 July 2006 6:10:46 am

Hi,

I want filter the access to the admin interface or on-line editor to certain browsers.

If the user access to admin interface or on-line editor with a non aproved browser, popups a windows warning the user. However, the page render as usual.

What are your suggestons to accomplish this ?

http://AlexandreCunha.com

Nathan Kelly

Monday 03 July 2006 8:12:20 am

Honestly, don't do it.

If you don't want people on certain browsers to have a bad experience then you should concider what you are about to do to them (a popup window telling them they should change the browser they are using is the worst experience they could possibly have).

Why would you want to do this to a user?

Is it because the online editor does not work in browsers other that IE?

If this is the case I'd suggest that rather than deny access or blast them with the "you need a better browser" thing with any browser other than IE, you serve them an alternative instead. Have you looked at the possability of IE conditional comments:

<!--[if IE]>
template for Online Editor here
<[endif]-->

this way people who don't like to use IE (for many reasons) don't get blocked from the site, they simply get a less interactive experience.

Cheers!

Pardon me while I burst into flames...

Alexandre Cunha

Monday 03 July 2006 8:40:22 am

Hi

Thans for your repply.

I dont want block users, i want:
- inform users, their can have a better web experince using a updated browser.
- this is only for internal use (intranet) for editors
- if the editor warns me because their browser (*) doest work with OE, my asnwer is: "have you see the notice/warning/popup when you login/edit objects with OE ?"

(*) i dont have chance to check if IE4,lynx,<watever browser you can imagine> works with OE, but I know FF 1.0, Opera 8.0 and many other works well, so i can prepare a list of sugested browsers.

http://AlexandreCunha.com

Nathan Kelly

Monday 03 July 2006 5:38:16 pm

I'm not sure exactly which browsers are supported by the OE, you could use a javascript browser sniffer but I personally wouldn't trust browser sniffing these days, I've played with a few good browser sniffing scripts but I find they sometimes make mistakes.

If you know what features the OE requires (I assume it uses javascript) your best bet would be feature sniffing (ie getElementById, document.layers etc.), that way if the browser doesn't support getElementById (for example) you could then use the script to popup an alert.

Unfortunatly I have limited knowlege of the OE as I haven't looked at it yet so Its hard to say exactly what it requires from the browser. Maybe one of the OE developers could shed some light on this for you?

Just out of curiosity what browsers are you expecting to access the site? Do you expect to get a lot of users on either very old or very under developed browsers?

Cheers!

 

Pardon me while I burst into flames...