sweenster
03-22-2004, 02:36 PM
I am writing a script to apply a different stylesheet to a page depending on whether the user is using IE or Mozilla.
1st part is fairly simple - browser is detected from the environment variable HTTP_USER_AGENT. This returns (for example):
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
I want to be able to split up this string so that only the browser type variable (i.e. the MSIE 6.0 in this case) is left. From that I can re-direct as appropriate
Any suggestions?
:)
1st part is fairly simple - browser is detected from the environment variable HTTP_USER_AGENT. This returns (for example):
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
I want to be able to split up this string so that only the browser type variable (i.e. the MSIE 6.0 in this case) is left. From that I can re-direct as appropriate
Any suggestions?
:)