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

eZ debug

Timing: Jan 19 2025 11:49:15
Script start
Timing: Jan 19 2025 11:49:15
Module start 'content'
Timing: Jan 19 2025 11:49:16
Module end 'content'
Timing: Jan 19 2025 11:49:16
Script end

Main resources:

Total runtime1.2740 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 589.0625180.8203
Module start 'content' 0.00761.1335 769.8828553.9688
Module end 'content' 1.14110.1327 1,323.8516336.7656
Script end 1.2739  1,660.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3060210.0002
Check MTime0.00150.1156210.0001
Mysql Total
Database connection0.00060.051010.0006
Mysqli_queries1.200094.19211970.0061
Looping result0.00220.17181950.0000
Template Total1.239697.320.6198
Template load0.00180.144920.0009
Template processing1.237897.160020.6189
Template load and register function0.00010.011410.0001
states
state_id_array0.00180.140310.0018
state_identifier_array0.00180.139320.0009
Override
Cache load0.00160.1233330.0000
Sytem overhead
Fetch class attribute can translate value0.00180.140730.0006
Fetch class attribute name0.00120.097750.0002
XML
Image XML parsing0.00080.060530.0003
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00180.1412270.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs