[ic] browser detection

Kyle Cook interchange-users@interchange.redhat.com
Tue Jan 29 16:51:02 2002


At 12:54 PM 1/29/02, you wrote:
>i currently have 132 categories and 19 areas in my store
>
>the category_vertical navigation code was several screenfuls long on the
>left side
>
>so, i use a javascript cascading menu, it displays fine on mac-netscape,
>windows-ie/netscape
>
>it will not display on mac-aol, mac-ie4
>(not my choice to support these, i have to)
>how can i detect browser info with interchange and send back:
>    my javascript body if not Mac
>    the standard category_vertical stuff if Mac
>
>thanks
>
>Jon

Jon,

Only as accurate as your Regex and the browsers identifiability,
but look into the session browser value:

[if session browser =~ /msie.*win/i]
You claim to be an msie running on windows
Seem to be a lot of you out there (
[/if]

[if session browser =~ /aol/i]
You have mail!
<snicker> Caught you !
[/if]

[if session browser =~ /libwww-perl/i]
Your an automated peeping Tom !
The nerve of some machines !
[/if]

[if session browser =~ /freebsd/i]
You appear to be running on a FreeBSD box.
Congratulations )
[/if]

[if session browser !~ /mac/i]
I do not believe you are on a Mac system.
[/if]





Kyle