Detecting Internet Explorer w/ Web Connection

21 views
Skip to first unread message

Nevin Pratt

unread,
Mar 21, 2001, 8:27:00 PM3/21/01
to
OK, when using Web Connection, how exactly do you detect which browser
is in use by the client (Internet Explorer or NetScape)? Specifically,
I'd like to be able to detect whether or not Internet Explorer is in
use.

The docs say:
The CGI Link Request part represents a request from a client
browser....You can retrieve the variables sent from the browser from the
cgiVars attribute. These variables provide information such as the
client and server software being used, the client host and user names,
and authentication information ...

So, I drop a CGI Link Request part on the canvas, and access it from
Smalltalk. From that part, I can send the #cgiVars message, and it
returns a dictionary of some values. However, it doesn't appear that
the browser info is available from there.

How exactly *do* you detect Internet Explorer?

I'm thinking of writing some JavaScript and have it execute on page
load-- but I really thought the CGI Link Request part could give me that
info.

Nevin Pratt

Rich Snarski

unread,
Mar 22, 2001, 12:57:12 PM3/22/01
to
You will have to modify abtswtt.c and add in the variable your application
needs. I have added support for cookies, by adding HTTP_COOKIE. There's a
list of all the HTTP Headers out there in Web land! There are two places in
the file where you'll need to add the HTTP Header variable. Here's one:

while (current)
{
if ((strcmp(current->prop.name, "CONTENT_TYPE")==0) ||
(strcmp(current->prop.name, "PATH_INFO")==0) ||
(strcmp(current->prop.name, "QUERY_STRING")==0) ||
(strcmp(current->prop.name, "REQUEST_METHOD")==0) ||
(strcmp(current->prop.name, "XWSI_CONTENT_DATA")==0))
{
ulongBuff++;
}
current = current->next;
}

HTH,
-rich

"Nevin Pratt" <ne...@smalltalk.org> wrote in message
news:3AB954E4...@smalltalk.org...

Reply all
Reply to author
Forward
0 new messages