Forum Moderators: open
Anyway - I'm going down the "one size fits all" route using a common CSS file for screens and handhelds. I'm testing on a Siemens S65 - plenty of storage, XHTML, supports the @media handheld approach and has a small enough display to make it a real challenge.
I've got it working. Even font-size: x-small works and the results are not bad.
Here's the tricky bit. The only place I'm currently differentiating between screen and handheld is in blocks within a common CSS file. Is it possible to drop text on one platform?
E.g., I have some fairly content-free headers (they merely repeat what's in other places on the page - no SEO benefit) that I'd like to render invisible on the handheld. Similarly, I'd like to put a WTAI tag on the handheld that would not be visible on the screen.
Can this be done with CSS - preferably in such a way that the Googlebot doesn't think I'm black-hatting?
PHP Example
<?php $useragent = $_SERVER['HTTP_USER_AGENT'];
if (eregi("Firefox/1.0", "$useragent")){echo 'Firefox Detected';?>
Cloaking is serving different code to different browsers. As far as I'm concerned it's legit if you're trying to aid the client but if Google cross checks your page with some other bot and you've changed say headers, images, and paragraphs based on the useragent then you might get a Google smack down.
Other people will not doubt jump on me or anyone else who mentions detecting by the useragent. First off the only people who spoof are spammers, people who think they're cool because they changed something, and lastly people who take privacy to extremes. Besides the spammers the other two groups are less common then iCab surfers.
If you need any more help just let me know.
- John