Jump to content

Mobile Web: How do I direct user?


cgm225

Recommended Posts

When someone visits my website... say Example.com, how do I direct people using blackberries, cell phones, pda's, etc, to a mobile version of the website, while sending the rest to the regular site?  Or, should the regular site somehow be compatible with mobile web devices?  I have read this but still need some help understanding how to code a webpage for mobile devices, and how to get those mobile devices directed to that webpage.

 

Thanks in advance!

Link to comment
Share on other sites

So you could use a link tag with a mediatype="handheld" attr? Not redirection, but it would work.

 

 

IE-only:

 

* {
   background: expression(location.href='http://www.google.com');
}

 

Yes, it does work.

 

I knew there was some kind of JS type thing in CSS, but I didn't know that people actually used it. Guess the whole IE-only thing is why.

 

Edit (Daniel0): Added real quotes.

Link to comment
Share on other sites

Well, it's stupid and it can bring the browser to its knees. It will not just be evaluated when you load the page, but also when you resize the viewport, move your cursor and all sorts of things.

 

Really?  That's gay.

 

(P.S.  I'm really bad about ghetto quoting things....  Bad habbit hehe.)

 

So again, how should I be directing mobile users to a mobile home page?

 

You could do the suggested by ardyandkari, although I'm not sure if all phones will work with that.  Or, you could check the user-agent or something.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.