|
-
Apr 4th, 2002, 02:22 PM
#1
ASP and the Wireless Web
I'm looking to develop a hybrid site for regular web browsers and wireless browsers. It would be ideal if I could use ASP to generate XML, then use XSL to transform my content to HTML or WML depending on which type of browser you are using.
The question becomes, how do I determine if you have a Wireless browser? How can I tell if you're using one of those little phones to look at my site, rather than IE or Netscape?
I was thinking of using the ServerVariable, HTTP_USER_AGENT. It returns "Mozilla..." when I look at it in IE; "NOKIA..." when I look at it though my WAP Emulator; "500:Internal Server Error" on an actual phone.
Does anyone know how I might be able to determine this via ASP?
-
Apr 4th, 2002, 02:34 PM
#2
Black Cat
Code:
If (Instr(1,Lcase(Request.ServerVariables("HTTP_ACCEPT")),"wap") <> 0) Then
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 4th, 2002, 02:43 PM
#3
Hmmm...OK
Would it ever be possible for wap to appear in that variable when browsing w/ IE/NS?
-
Apr 4th, 2002, 03:18 PM
#4
Black Cat
If the User Agent says it will support WAP, then you can send it to them.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 4th, 2002, 03:24 PM
#5
I meant the HTTP_ACCEPT
I liked your idea but if I'm basing whether to spit out WML or HTML based on that, I'd like to be sure that IE/Netscape won't produce wap somewhere in the HTTP_ACCEPT variable
-
Apr 5th, 2002, 12:14 PM
#6
Black Cat
Originally posted by WALDO
I meant the HTTP_ACCEPT
I liked your idea but if I'm basing whether to spit out WML or HTML based on that, I'd like to be sure that IE/Netscape won't produce wap somewhere in the HTTP_ACCEPT variable
I don't think they normally would, but you could check for the whole "application/wap" or whatever they would send. It they do send it (maybe an add-on or plug-in is installed), then you could send them the WAP as they are saying they'll accept it, or check for a "text/html" in the accept. IE6 sends "Accept: */*".
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 5th, 2002, 12:18 PM
#7
I think I'm going to look for HTTP_ACCEPT to contain
text/vnd.wap.wml
-
Apr 5th, 2002, 01:39 PM
#8
Black Cat
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|