w3c / Mobile-Checker

The Mobile Checker is a tool for Web developers who want to make their Web page or Web app work better on mobile devices.
https://validator.w3.org/mobile-alpha/
MIT License
322 stars 84 forks source link

Detect opportunities for faster first view #8

Open dontcallmedom opened 10 years ago

dontcallmedom commented 10 years ago

A number of things will block the browser from displaying anything when loading a Web page:

In addition, some other assets will create unwanted artifacts when loading a Web page; the "flash of unstyled text" (often referred as FOUT) due to downloadable fonts (e.g. WOFF) is probably the most well-known of those.

The checker should (as far as possible) give advices on how to reduce or remove these.

dontcallmedom commented 10 years ago

One of the critical items in performance is detecting "first paint". From what I understand, this can be detected via an extension to the Navigation Timing API in Chrome and IE (nt_first_paint); see the Yahoo plugin to expose it: http://www.lognormal.com/boomerang/doc/api/navtiming.html https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html

In general, Navigation Timing will be a very useful API to make a performance profile of the page.

Unfortunately, it looks like it isn't implemented in phantomjs: https://github.com/ariya/phantomjs/issues/10570

Searching about around this, I've found http://www.sitespeed.io/ which is an open source tool to measure performance that can be configured to apply some specific rules. There may be a lot to be gained by importing that tool in ours (if that's at all possible).