detecting slow page response on mobile devices

13 views
Skip to first unread message

John Divon

unread,
Jul 11, 2009, 4:29:25 PM7/11/09
to web2py Web Framework
Hi all,

I have an application that serves mobile users as well.
For the mobile users, I need to be able to find out if loading the
page takes too much time.
I know that the user uses his mobile to view the page since it is a
specific page that has been pushed to his mobile.

How can I know the time it took the page to be displayed on the user's
mobile phone, and if it was successfully displayed?

Thanks,
John.

mdipierro

unread,
Jul 11, 2009, 5:15:48 PM7/11/09
to web2py Web Framework

Hans Donner

unread,
Jul 11, 2009, 5:24:32 PM7/11/09
to web...@googlegroups.com
'smertphone' ?

Jonathan Lundell

unread,
Jul 11, 2009, 5:29:46 PM7/11/09
to web...@googlegroups.com

One possibility is to use JQuery to send back an AJAX message via the
load event.

See this: http://docs.jquery.com/Events/load

(Don't confuse 'load' with 'ready'; the latter fires as soon as the
DOM is built, and before all the other stuff has been loaded.)

John Divon

unread,
Jul 11, 2009, 5:43:48 PM7/11/09
to web2py Web Framework
Hi All,
Thanks for all the replies!

The point is that I can estimate the time the page is loaded if I am
using python time object at the controller, save it into the session
and then, at the end of the page, diff it with another python time
object.

However, this solution estimates only the time the page is loaded -
which is usually very fast. Apparently, what I need to know is how
much time it took the user to see the page.... on some old mobile
devices, it takes up to 30 secs. before the page is displayed
(including opening the wap link) and I need to know if this is the
case.

In addition, I am actually serving http pages and not wap pages -
don't know yet if this is an issue with response time since basically,
the connection with old phones is wap.

BTW - I can see the phone model by using request.env.http_user_agent

Thank you all.

Jonathan Lundell

unread,
Jul 11, 2009, 6:51:36 PM7/11/09
to web...@googlegroups.com
On Jul 11, 2009, at 2:43 PM, John Divon wrote:

>
> Hi All,
> Thanks for all the replies!
>
> The point is that I can estimate the time the page is loaded if I am
> using python time object at the controller, save it into the session
> and then, at the end of the page, diff it with another python time
> object.
>
> However, this solution estimates only the time the page is loaded -
> which is usually very fast. Apparently, what I need to know is how
> much time it took the user to see the page.... on some old mobile
> devices, it takes up to 30 secs. before the page is displayed
> (including opening the wap link) and I need to know if this is the
> case.
>
> In addition, I am actually serving http pages and not wap pages -
> don't know yet if this is an issue with response time since basically,
> the connection with old phones is wap.
>
> BTW - I can see the phone model by using request.env.http_user_agent
>
> Thank you all.

That reminds me: the JQuery method assumes, obviously, that the mobile
phone supports JavaScript.

I use a mobile phone detector on a weather page that I maintain (http://lobitos.net/wx
) that does divides mobile phones into two groups: smartphones
(Windows, Android, Pre, iPhone) vs the others. The first group is
really a very different category.

FYI, here's the list; it's Perl, so translate accordingly. It assumes
that you check mobile_agents first.

my @mobile_agents = (
'iPhone',
'iPod',
'Android',
'BlackBerry9530',
'LG-TU915 Obigo', # LG touch browser
'LGE VX',
# Palm Pre is reportedly Mozilla/5.0 (webOS/1.0; U; en-US)
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1
Pre/1.0
'webOS', # Palm Pre
'WebOS', # Palm Pre (just in case)
'\bPre/', # Palm Pre
);

my @pda_agents = (
'2.0 MMP',
'240x320',
'400X240',
'AvantGo',
'BlackBerry',
'Blazer',
'Cellphone',
'Danger',
'DoCoMo',
'Elaine/3.0',
'EudoraWeb',
'Googlebot-Mobile',
'hiptop',
'IEMobile',
'KYOCERA/WX310K',
'LG/U990',
'MIDP-2.',
'MMEF20',
'MOT-V',
'NetFront',
'Newt',
'Nintendo Wii',
'Nitro', # Nintendo DS
'Nokia',
'Opera Mini',
'Palm',
'PlayStation Portable',
'portalmmm',
'Proxinet',
'ProxiNet',
'SHARP-TQ-GX10',
'SHG-i900',
'Small',
'SonyEricsson',
'Symbian OS',
'SymbianOS',
'TS21i-10',
'UP.Browser',
'UP.Link',
'Windows CE',
'WinWAP',
'YahooSeeker/M1A1-R2D2',
);

Jason Brower

unread,
Jul 12, 2009, 12:42:11 AM7/12/09
to web...@googlegroups.com
It may be a little off topic, but actually on too...
have you looked into pywurfl.
http://wurfl.sourceforge.net/
This tool has been a great use for us with our mobile users.
It is also the reason I wanted to have rendering thumbnails on the fly.
So depending on the screen it sends an optimized image just for that
phone.
Regards,
Jason
Reply all
Reply to author
Forward
0 new messages