detecting spdy by javascript/GA

106 views
Skip to first unread message

Ido

unread,
Jun 5, 2011, 8:33:47 PM6/5/11
to spdy-dev
Hi,
It will be helpful if the browser (chrome) will have some object/
attribute so that a javascript can identify if the page was delivered
over spdy. This is very important for reporting/analytics.
making it available on googe analytics will also be helpful.

obviously a page may have many resources, delivered from different
hosts, but the HTML, or the scope where the script runs will be
sufficient.

Is there a way to add that/get this data, or is there a reason
(security/privacy?) not to provide that?

thanks,
- Ido

William Chan (陈智昌)

unread,
Jun 5, 2011, 9:50:23 PM6/5/11
to spdy...@googlegroups.com
I believe that's available at window.chrome.loadTimes().wasFetchedViaSpdy.

Mike Belshe

unread,
Jun 30, 2011, 8:22:37 PM6/30/11
to spdy...@googlegroups.com
On Sun, Jun 5, 2011 at 6:50 PM, William Chan (陈智昌) <will...@chromium.org> wrote:
I believe that's available at window.chrome.loadTimes().wasFetchedViaSpdy.

Keep in mind that this flag has some issues.

1) The flag is page-level based, but doesn't consider hybrid modes.  In other words, this flag is true if the main resource is SPDY based, even if the subresources are not.  Likewise, if the main page is loaded via HTTP, but all the subresources are loaded via SPDY, the flag will return false.

2) Chrome is losing track of this flag on page fragments.  e.g. http://www.foo.com/#asdf  - the hashtag reload drops the wasFetchedViaSpdy flag.  this is a bug.

Mike

 
Reply all
Reply to author
Forward
0 new messages