Make your WAP website better compatibility

xiaoxiao2021-03-06  16

Today, I saw the home page of a friend's WAP website to browse it. It seems that he must be a checklist. If you do not support WML, it is redirect.

Come carefully, Redirect is only for a browser that does not support WML (such as IE), so RESPONSE.REDIRECT is still available, how is the key to determine if the browser supports

So asked friends to see, the result was this:

IF (STRPOS ("WAP", $ _HTTP_GET_VARS ['http_accept']) {header ("location: http://hikey.net");}

PHP code ...

But my program is ASP, so I have this code:

<% Response.Buffer = TRUE Dim IsWap httpAccept = LCase (Request.ServerVariables ( "HTTP_ACCEPT")) if Instr (httpAccept, "wap") then IsWap = 1 Else Response.Redirect "http://www.hikey.net/ WR /? http://hikey.net/wap "response.end end if%>

Plus this code on the head of your WAP page (the most!), Do it: If the browser does not support, redirect it to the WAP emulator provided by HIKEY.NET? Back can be changed Your website address

Even if others only know your URL, I don't know how your website is accessible, he can also see the effect ...

转载请注明原文地址:https://www.9cbs.com/read-45659.html

New Post(0)