Retrofit Your Web Pages For Wireless Compatibility
An anonymous reader writes "You probably don't want to maintain Web and wireless versions of the same site or take on the overhead of Extensible Markup Language (XML) transformations. This article shows you a more practical approach to wireless compatibility. With some well-designed XHTML, a bit of CSS, and the media attribute, you can do wonders. Create more flexible, Mobile device ready, Web pages with XHTML and CSS."
If you weren't writing flexible web design ten years ago, you should have been. There's nothing new in it; and indeed, much of what is being suggested in this article is still bad old inflexible design, which will still break badly on devices which you did not expect.
never — never — use absolute (pixel) dimensions for anything other than images. You don't know how many pixels wide the screen you're addressing is. The browser at the far end does, though, and if you get out of its way and let it do it's job intelligently, it will.
I'm old enough to remember when discussions on Slashdot were well informed.
Too bad MS didn't think of this sooner. They would have avoided a lot of problems.
FWIW, you can check out your site in Opera using Small Screen Rendering (shift+F11) for an easy preview. It follows css rules nicely.
This is just what we need. Another "temporary solution". The next thing that's going to happen is that everyone will start complaining how a browser doesn't respect some standard. I think that there should be no "intermediate" solution for this. Either you do it like you should have done it, or you don't! P.S: I'm sorry, I had to say this, I'm the first one, I hope :-). In Soviet Union, the web pages retrofit you.
As for applets, macromedia flash and other proprietry media formats, well...
If you create a web page that is clean, well structured and doesn't rely on stupid things like Flash, it should be viewable with wireless devices without any changes.
- Fetch HTML (long wait).
- Parse HTML.
- Render preliminary (no-CSS) view.
- Fetch CSS (another long wait).
- Fetch inline images (again, a long wait, but slightly overlapped with the previous step).
- Render final view.
It is also worth noting that your readers are likely to be paying for bandwidth on mobile devices - if you use a lot of small CSS files then you will not only make it take a long time for people to view your site, you will also make it expensive (that HTTP request overhead adds up a lot faster than you might think).I am TheRaven on Soylent News
A much more generic solution would be for the content manager to generate only XML, and for XSL (client side) or XSLT (server side) to do the customization. Then the possibilities for fitting onto any client device would be endless. CSS only affects existing classes and elements. XSLT generates whatever elements and styles them as it pleases.
Very interesting write-up, but how many webmasters/blogmasters/etc... really care if a webpage is hard to read on a mobile device? Isn't the title also misleading? This has nothing to do with whether the accessing device is "wireless" (my laptop is wireless), but rather if the accessing device is mobile (i.e small screen)
Pretty much all the websites work about the same on my mobile wireless laptop. Why would people need to modify how they make the sites for them to work right?
-- these are only opinions and they might not be mine.
It wasn't long ago that /. changed to a mobile-aware CSS. Which was a good thing for my smartphone, but bad thing for my PDA. It looked pretty decent to begin with on the PDA.
But overall, this is really a good idea. Where I work, we have some monitor/reporting/utility pages, and I've already requested mobile-device css for them.
If I go somewhere (and am on call) I don't need a PDA or laptop, just a smartphone or something similar... all set.
FLR
Except that almost all phone/pda browsers can only handle HTML 3.2 at best and bork at the slighest bit of CSS. This article is day dreaming at best. We're a long way off ever serving the same page to mobile browsers as desktop browsers.
firefox still displays the content the same on my laptop
http://validator.w3.org/check?verbose=1&uri=http%3 A//www-128.ibm.com/developerworks/wireless/library /wi-css/%3Fca%3Ddgr-lnxw01WirelessPages/
perpetually dwelling in the -1 pits
You can also filter your existing output via XSLT. It is quite easy using servlet or Apache filters.. or whatever you have. For normal pages, just do a copy. For limited devices, convert and/or trim data. Be sure to turn off XML validation, since most content engines generate bad XML.
I am alone in thinking that the 'net on a 1 1/2 inch phone screen is almost pointless? Slow, ugly, and frustrating to the extreme.
Accessing the 'net on my Motorola is almost always something done while stuck in a boring lineup, and the local weather report is the only thing that I've bothered to bookmmark.
Three Squirrels
couldn't resist...
My other account has mod points.
"never -- never -- use absolute (pixel) dimensions for anything other than images." never - NEVER - say never. BTW, "except images" - quite an exempt right? given that it's actually images that we use to style lots of the design elements in web pages (menu backgrounds, buttons etc.). Of course except on straight barely formatted "academic" pages teaching is what to never do with our site's code. Thing is some things work best in pixels (images, certain menus, elements, buttons, heading text) and some things work best flexible (body text, probably fluid column layout etc.). If you think otherwise, try reading a "fluid columns" layout on a high resolution screen (1600x1200 for ex.). The paragraphs become so wide, since they stretch of course, that you can't follow to the next text line (and we know columns are far from easy to implement with today's browsers). Most images should be stripped for mobile CSS so the rest can be flexible and stretchable, but it's far from a "never" situation now, is it. But of course I confirm that setting fixed page width in a mobile CSS is quite ignorant from the article's author.
- don't use frames...
- text-only on main page...
- don't get fancy...
- most Web pages nowadays suck the big one...
- keep it simple...
- keep it PDA-friendly...
- Flash? Fahgehtaboutit!
- whatever happened to WAP?
With a lot of useful tips on how things work in the real world: Mobile Web Design: The Series.
Looks good on Safari.
live image resizing in-browser
http://lkml.org/lkml/2005/8/20/95
Well, according to the HTML standard you should.
However if you want scalable images you should go for SVG. Both Opera (8.0+) and Firefox (1.5+) supports this natively. Konqueror has a nice KPart, and IE users can use Adobe's plugin.
But hey, everything is bloated today, so why not web pages, eh?
"I love my job, but I hate talking to people like you" (Freddie Mercury)
What I want to know is how do your graphics look on a green screen with a hurcules (HGA) monocrome graphics card?
I don't refer to the internet as "the web". There are more protocols than http, really.. have a look..
-=[ place
This is a great article from the standpoint that it gets people thinking about standards compliance and web pages that validate. However, if you actually want your web pages to be correctly renderable on many browsers, you need to be able to send different markup based on the target browser. This is particularly painful for mobile phone browsers, where the specs supported are all over the map. The phone/browser manufacturer may claim XHTML-MP 1.0 compliance, but only support a subset of the actual spec.
In order to make our site compatible with as many mobile phone browsers as possible (I work for 4INFO), we use the WURFL Wall JSP tag library. This matches the browser user-agent, against a database of known devices and capabilities, and renders the appropriate markup. Only after extending that library and updating its device database have wee been able to get our WAP site to render on most mobile phone browsers.
like the subject says- what about those devices with no CSS support? they're around enough, not all that rare. not everyone has a brand-new Microsoft Smartphone/WM5 phone, with the closer-to-desktop browser, or NetFront, which is even better. All that fancy CSS might look great in a 200x160 sized window on your desktop in trying to emulate a wireless device, but with those non-CSS devices out there it might just look like crap.
just a thought...
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
A great test of a web site tests is loading on a Blackberry. Sometimes I move blocks of code around and use absolute positioning so the good stuff renders first, to help reduce thumb pain. (/. has too many nav links at the top of the code, so you have to scroll a lot to see the stories.) Googlebot "sees" web pages much the same way as a Blackberry. Indeed, search optimization and accessibility have a lot in common.
I am not sure XHTML is the key to accessibility. XHTML allows tables, which are often misused to control layout. The code flow of a table is different from visual representation, causing loss of semantic information when the page is rendered on alternative browsers or spiders that don't assemble the table the same way.
These common SEO/accessibility strategies provide good results on mobile devices, even with HTML 4.01, and as an additional benefit, make it much easier to manage the site, and may help search visibility:
- Fix all validation errors and warnings.
- Replace Javascript menus, or provide alternate text menus wrapped in NOSCRIPT tags.
- Add alternate plain HTML to any Flash OBJECTS.
- Strip layout tables and replace with DIVs. Tables with tabular data are fine, but consider adding CAPTION, THEAD, TBODY and TFOOT for better control over appearance.
- Rip out presentation attributes and replace with CSS formatting. This greatly reduces file size and simplifies the code reducing the potential for errors, speeding page loads, and saving Google some disk space.
Once the above process has been done, the resulting HTML 4.01 can be converted to XHTML with trivial easy.Basically, if you want to support mobile browsers, you need to get rid of Flash, Javascript, and frames, and put the main navigation into brief text at the top of the page, and try not to be too wordy about it. In other words, make pages that Netscape 1.0 and Lynx could have rendered well, and you're off to a very good start.
Bill Stewart
New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
1.) Hire a good editorial team
2.) Build effective tools that allow that editorial team to repurpose your web content for mobile devices.
The reason for point 1 is this: when using a mobile device users typically want to read less. They're busy, they're also doing something else, they're utilizing a snatched bit of time to get some facts. Very few of them want to read the same amount of content they would on a web browser. Until we have AI you'll need a good human sub-editor to trim away the fat and leave usable content that works.
The reason for point 2 is this: phones suck. They do. They have small buffers, in some cases less than 30k. They may also have 80mb of onboard flash for mp3 ringtones, photos and videos - but the browser buffer is still 30k. So I don't care if you've "hidden" some of your page using CSS - it's still taking up "space" in the downloaded file size. XSLT can be your friend here - both WML and XHTML-MP are sensible mark-up formats to mash around with XSLT.
Maybe this is more of an issue in Europe than in the US - but certainly in the UK, where I am, you can't just quickly repurpose your site - the content needs modifying to be servicable and the mark-up needs to be kept trimmed right down. Hell even 02 with their fancy new i-mode service are setting a 10k page size limit for content providers.
I don't see the problem. Why avoid tech? You can be the hottest web artist and/or editor, but still only be a Luddite empirical black-box person. Oooh, the mystery of tech.
I read EVERYTHING on my PDA phone. 99% of my browsing, posting and e-mail is performed there. Sites that don't support me don't get viewed, and as time goes on, there will be more like me.
I've spent thousands annually subscribing to websites that support my PDA. Slashdot was actually one of the first. Google does it as well. I can't wait to see what happens as mobile browsers become more available.
I just picked up the Samsung t809 phone and can browse the web via Mini Opera (or my PDA synced via Bluetooth). Getting 150kbps downloads through T-Mobile's EDGE, so most websites are instantaneous even on the road (yeah, it's safe, sure it is).
There are webmasters that have e-mailed me back saying they'd never support a tiny screen. I don't see how you can ignore the amount of phones that read more than just WAP -- many are HTML compliant with just a little software addition. Give it time and I bet we'll see popular sites getting more than 5% of their users from tiny screens.
Clearly you haven't been to CSS Zen Garden. The main page isn't that terribly exciting, but if you check out the designs it showcases, you might think differently [about CSS].
It's amazing what just a change in CSS can do (as CZG articulates). Go ahead and test it in different platforms.
Good page design is about a good designer.
Most of what the article is talking about also can easily be extended to print medium as well. That is, the way a page looks when printed out.
Through a very simple use of CSS, you can rearrange the page to be more friendly for print format by dropping background colors, making the text black, and removing sidebars and navigational elements.
With a little more effort, you can rearrange elements, replace graphics/logos with black & white versions, and rearrange the text so that it's occupying the full width of the page, etc. The driving directions feature on google maps is a great example of this concept.
Even slashdot's CSS redesign sports some of these features by dropping the ads, the top row of topic icons, the sidebar, the "Read More..../Comments?" line below each article, and other assorted navigational elements. Granted, it's still not very pretty compared to most, but it looks a hell of a lot better than the manner in which browsers butcher printed documents without no media attribute set.
-- If you try to fail and succeed, which have you done? - Uli's moose
The first thing I noticed when using Opera shift+f11 was that the adds on slashdot and my websites are gone. If people can't see the ads then i'm not going to bend over backwards so they can view my website on their tiny screen. I have no idea if this applies to all mobile devices or if this is something that google, amazon, ect. just don't care to address.
Besides having no ads, who wants to view great photos and hd video on a tiny screen. About the only websites that would be worth viewing are forums and news. To post to a forum with your phone you will need a separate keyboard (unless you want carpal tunnel) and if your going to carry around a separate keyboard, then you might as well buy a laptop. Since I can't compete with google news and don't run a forum, I see no reason to bother. They can still view my website, it just doesn't look very good, but what really looks good on a tiny screen anyway. I have yet to see a huge demand for the new line of 13" home LCD monitors.
I've been looking at WURFL and the Wall JSP tags in particular. I'd be interested to know what extensions you needed to make to the tag library and how you got on in general.
The updates to the device database are a fact of life I guess (especially given that the WURFL guys seem to be Europe based and you seem to be US based - I assume there are some differences in the devices available).
[pnee] [at] [toombeola.com]
Competant developers have been using xhtml and css for 10 almost years
Ignoring for a second how these standards haven't been out that long, hardly anyone is currently supporting XHTML strict properly anyway: using the correct MIME type. In short, if it works in Internet Explorer, it's the wrong MIME type, even if w3.org's validator says it's fine. No company is yet happy with the idea of their web site not working in IE, so they use the incorrect MIME type.
Incidentally, there's a version of XHTML intended specifically to make sites easy for mobile devices and such to swallow: XHTML Basic. From W3's site:
I've never felt a need to use regular XHTML for my home projects, as XHTML Basic is more than enough, but I use the latter at work. Oddly enough, the article doesn't even seem to mention XHTML Basic.
"Wireless" in the United Kingdom means wifi - wireless networks, whereas "Mobile" means cellular phones. It's damned confusing when mobile phones are referred to using the single word "wireless". My initial instincts were to question what differences there would be between a web page received over a wireless connection versus a normal wired connection.
In Opera's site there are more useful tips for developers, see Authoring for Small-Screen Rendering (SSR) and linked pages. Not a lot, but much more than in this article which still assumes web developers don't know the benefits of XHTML, CSS and how to make the stylesheet external, and doesn't go much beyond hiding images and document order.
Can you elaborate on that? I've had no problems with it. I agree with your other statements, though.
"Our interests are to see if we can't scale it up to something more exciting," he said.