开发者

How can I code an efficient mobile site like gmail's?

My web site has a different mobile version that's suited for iPhone/Android devices. 开发者_开发问答The problem, however, seems to be in the site's performance. It's really slow and heavy, even though I'm not loading any images.

On the other hand, when I use Gmail's or YouTube's mobile version, they're so fast they almost perform like a native mobile application.

How do they do that?

Your help is much appreciated :)


See my comment. Also, if the slowness you perceive is when interacting with the site it could be that it lacks the ability to accept touch events. On mobile web, if you have not wired up the UI for js touch events the experience will seem slower because the device browser has to fall back to standard click and other mouseevents which are not optimal. Frameworks such as mootools and jquerymobile/jqtouch have these events baked in. Take a look at the mootools solution which has quite a good write up: http://davidwalsh.name/mootools-touch


They probably making use of local storage http://dev.w3.org/html5/webstorage/ Are your pages too large? Try to use gzip and/or reduce output Your server's connection speed may also be responsible of slowness


Well, You don't need to include any javascript framework to make it fast clickable.

By implementing some JavaScript you can achieve that. Google has released a solution for that

https://developers.google.com/mobile/articles/fast_buttons

This will allow visitor to interact with application native way. From Android 4 (as far as I remember) version by setting viewport meta tag the browser will automatically apply the fast click functionality.

For the animation issue always use Hardware accelerated animation with a fall back for older mobile browser. Using hardware accelerated animation it will make your application smooth as silk.

Follow this guideline and you can make your application as fast as gmail / youtube mobile version.

http://www.html5rocks.com/en/tutorials/speed/html5/

Best of luck.


Your webapp is consuming too much RAM. Don't use so many libraries and don't attach so many event handlers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜