homepage Welcome to WebmasterWorld Guest from 54.227.40.166
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
Forum Library, Charter, Moderators: bakedjake

Smartphone, Wireless, and Mobile Technologies Forum

    
Redirect a mobile/PDA to a "lite homepage"
full webpages kill smartphones i need to redirect them to a lite version
edward301




msg:932915
 5:27 pm on Apr 25, 2004 (gmt 0)

Redirecting a phone or pda to a lite version of a webpage using plain html,javascript or php

any surgestions?

 

pixelkat




msg:932916
 5:50 am on May 12, 2004 (gmt 0)

yes! use css. write once.use everywhere. that's all it takes!
1. your desktop web site must be liquid/elastic using the box model.
2. define your fonts in ems instead of points or pixels.
3. make images be backgrounds and use pure css mouseovers instead of images.
4. access earlier posts in this discussion group for information about importing styles, declaring media="handheld", and the right doctype.
5. also, use xhtml instead of html 4.0

ssvenson




msg:932917
 5:45 pm on May 20, 2004 (gmt 0)

I've done it...

In ASP though, so you will have to look up the appropriate commands in PHP to do the same (easy).

userAgent = Request.ServerVariables("HTTP_USER_AGENT")
userAgent = lcase(userAgent)

if Instr(userAgent, "mozilla") <= 0 then
if Instr(userAgent, "alcatel") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "ericsson") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "nokia") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "panasonic") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "phillips") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "samsung") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "sanyo") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "wml") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "up") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "mot") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "wap") then
Response.Redirect("/wml/index.asp")
elseif Instr(userAgent, "ppc") then
Response.Redirect("/ppc/index.asp")
elseif Instr(userAgent, "ce") then
Response.Redirect("/ppc/index.asp")
end if
end if

So basically you get the user agent from the client and parse the string... This works for everything I have so far, except for the ppc line, which I've seen a couple of glitches in...

Shaun

edward301




msg:932918
 6:18 pm on May 20, 2004 (gmt 0)

that great thanx 4 all ur help

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved