My goal is to know if my android app and my browser are talking to my web server on http2. Using open source nginx stable 1.12 on linux.

Looking at the network or other tools of firefix (version 54) or chrome (version 59) can we tell that ?

Response Headers I get on hitting sub domain (like https://a.my.com/):

Date: Thu, 13 Jul 2017 11:02:06 GMT
Last-Modified: Wed, 12 Apr 2017 14:46:01 GMT
Connection: keep-alive
Etag: "58ee3da9-264"
Server: WebServer
Strict-Transport-Security: max-age=63072000
x-frame-options: DENY
X-Content-Type-Options: nosniff
Cache-Control: no-cache
Alternate-Protocol: 443:npn-spdy/3

But when I hit a page (https://a.my.com/b/c/) the last header is not returned. My app hits a page like that. Response Headers:

Date: Thu, 13 Jul 2017 11:11:13 GMT
Content-Type: application/json
Content-Length: 235
Connection: keep-alive
Access-Control-Allow-Headers: origin, content-type, accept, authorization
access-control-allow-credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS, HEAD
Vary: Accept-Encoding
Content-Encoding: gzip
Server: WebServer
x-frame-options: SAMEORIGIN

Does the client browser hit the base URL to get the protocol anyway without logging it? (I opened a reopened my browser and tried in a private window, to hit the page first, still did not see the Protocol info).

Just curious if its a config thing/ if it matters or trust the clients to use the best protocol without changing anything on the server or android app code?

  • 1
    Have you looked in your nginx log file? I know that Apache logs the HTTP version of every request. I'd assume that nginx does that, or can be configured to do that. Commented Jul 13, 2017 at 12:14
  • @stephen-ostermiller yes your right. (Sheepish smile). If this question is good maybe you can make your comment an answer? The default log has it. Very few requests were http/2 we are investigating. thank you
    – tgkprog
    Commented Jul 13, 2017 at 18:53

2 Answers 2


I've uploaded the script bellow to a server with nginx/1.10.0 and it correctly identified Chrome (http2) and Curl (I know my curl works in http1.1)

  • I do not have php on my server. Though upvoted your answer as i guess it would help
    – tgkprog
    Commented Jul 14, 2017 at 9:50

From Stephen Ostermiller: nginx log file. I know that Apache logs the HTTP version of every request. I'd assume that nginx does that, or can be configured to do that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.