Sapere se una richiesta è fatta da un browser HTML o da un browser WAP
C'è una variabile di sessione molto interessante, HTTP_ACCEPT, che ha al suo interno la lista di tutti i mime type supportati.
Cercando quindi al suo interno la stringa WML, possiamo sapere a priori se la richiesta è fatta da un browser WAP o meno.
<% ric = Request.ServerVariables("HTTP_ACCEPT") if instr(1, ric,"wml") > 0 then Response.ContentType = "text/vnd.wap.wml" '... codice WML ... else Response.write "<HTML><Body><p>Codice HTML</p></Body></HTML>" end if %>
Per approfondimenti sul WAP, si veda
http://www.aspitalia.com/articoli/xml/wap.asp
http://www.aspitalia.com/articoli/xml/wap2.asp







