I once made an imode version of a website.
First thing, instead of having "if(Mobile...)" everywhere, you may
consider using a dedicated CSS file (easy to do on server side). This
will do 99% of the trick (changing menus layouts, using more suitable
font/colors, hiding advertisings, using lightweight/smaller images,
You may also add some class to the body and select objects you want
handlers to with that...
OK, this was not very clear :o) A small example :
<div id="menuBar"> .../... </div>
Then, instead of having:
you can use:
So, if you're serving a "pointerless terminal", you just don't add the
"HasPointer" class to body element, and the $$() statement will do
Just a couple of other considerations to think about:
- Phones/PDA's CPUs are often slower than a desktop PC, so be careful
if you do extensive client processing (like using the DOM to create
1000 rows table). When possible, try to test the site on the actual
device (emulators don't usually run at the real speed)
- In some country, peoples pay their mobile internet access according
to the volume of dl data, and the dl speed can be very slow on some
poor covered areas. So, it would be nicer to do your "if(mobile)"
tests server side, to avoid having the mobile browser downloading both
its code and the desktop version code it will not use.
- If you do the point above, it is very important that you check your
generated file WILL BE CACHED (by default, most dynamic pages are NOT
That's all I can remember about this.
On Aug 14, 2:09 pm, Cyrus <arianglan...@googlemail.com> wrote:
> I can't believe no one has tested his projects with a mobile / touch
> screen device ...
> On 29 Jul., 11:11, Cyrus <arianglan...@googlemail.com> wrote:
> > Hi,
> > while testing my prototype scripts on Mobile Safari I have seen, that
> > they might need extra attention in my code ;)
> > E.g. I have a menu bar that is only visible when I move the mouse.
> > There is no mouse (movement) on a touch screen device, so I need to do
> > some adjustments.
> > Are there any best practices / recommendations how to write this kind
> > of code? I guess a simple
> > "if (MobileBrowser)" is enough, but is there anything already
> > available within prototype framework?
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at