Test with and without HTTP/2

Hi there,

I want to test a site capable of HTTP/2 with HTTP/2 and without (HTTP 1.1) to see the differences in performance, session handling and so on.

I try to disable HTTP/2 via setting a firefox preference in test script:

firefoxPref	network.http.spdy.enabled.http2	false
navigate	https://www.cloudflare.com

Resulting waterfalls look strange somehow:

cloudflare - first request isn’t included in waterfall:
http://www.webpagetest.org/result/160114_FJ_NGC/1/details/

google - no request in waterfall at all:
http://www.webpagetest.org/result/160114_7A_M43/

twitter - same as with cloudflare, first request not in waterfall:
http://www.webpagetest.org/result/160114_EK_MK8/1/details/

Any ideas?

Regards, Nils

My guess is that Firefox falls back to SPDY if HTTP/2 is disabled and I haven’t implemented SPDY decode in the firefox agents yet. Is there a pref to disable SPDY as well? If so you’ll want to set that (since that’s what you want to test anyway).

Great guess, that’s it!

firefoxPref	network.http.spdy.enabled	false
firefoxPref	network.http.spdy.enabled.http2	false
navigate	https://www.cloudflare.com

http://www.webpagetest.org/result/160114_ZE_PGW/1/details/

And second firefox preference is possibly unnecessary.

Update: I did some testing and seems the only setting needed to disable h2 and spdy in Firefox is network.http.spdy.enabled

[code]// Disable SPDY/h2
firefoxPref network.http.spdy.enabled false

// Navigate to the page in question -navigate command is required when scripting-
navigate https://http2.akamai.com[/code]

Here is the WPT test where this has been tested: http://www.webpagetest.org/result/160401_PB_087c76159efae899356349078e43d26b/

Pat,

I just did a test https://www.webpagetest.org/result/161003_Y5_73272a277161f73be7fa9dd05c6ade7f/ and seems h2 is not getting disabled in Firefox anymore.

Do you know what could be the reason?

I see one more option called “network.http.spdy.enabled.v3-1”. When I turned this off, I was able to force HTTP2 to be turned off on FF.

firefoxPref network.http.spdy.enabled false
firefoxPref network.http.spdy.enabled.http2 false
firefoxPref network.http.spdy.enabled.v3-1 false
navigate https://http2.akamai.com

WPT: https://www.webpagetest.org/result/161004_EG_be271ece47449783d096ce88428c06bd/1/details/#waterfall_view_step1

I just discovered that h2 will only be disabled when using Tabs (instead of spaces) to separate Firefox settings.

For example:

  1. using spaces to separate settings renders the page over h2: https://www.webpagetest.org/result/161116_9M_1ec921eab5b2fe69b7808c495c4b176e/ I am using:
    firefoxPref network.http.spdy.enabled false
    firefoxPref network.http.spdy.enabled.http2 false
    firefoxPref network.http.spdy.enabled.v3-1 false
    navigate https://http2.akamai.com/

  2. using tabs to separate settings renders the page over h1:
    https://www.webpagetest.org/result/161116_PB_72b17d9adfedeb4d1d3747a1deb2320d/
    firefoxPref network.http.spdy.enabled false
    firefoxPref network.http.spdy.enabled.http2 false
    firefoxPref network.http.spdy.enabled.v3-1 false
    navigate https://http2.akamai.com/

When I try with Firefox itself (without WPT) h2 gets disabled by just setting “firefoxPref network.http.spdy.enabled.http2 false” within about:config

Pat, do you know if there is something on the WPT code that may cause that?

The scrips are always supposed to be tab delimited. There is some server-side logic that tries to convert space-delimited scripts to tab but it may not be handling the firefoxPref command correctly.

Yep, should be fixed now. The conversion logic didn’t treat firefoxPref as a “3 parameter” script command which was messing it up.