Zeigt Google Chrome im dev-tools Netzwerkmonitor die falsche Website-Größe an?

1354
mgutt

Ich verwende Google Chrome und habe versucht, mit dem integrierten Netzwerkmonitor für Entwicklertools (F12) zu überprüfen, ob die GZIP-Komprimierung auf meiner Website aktiviert ist. Nachdem die Online-Tools mitteilten, meine Website sei komprimiert, aber mein Browser habe eine andere Größe angezeigt, testete ich sie auch mit https://superuser.com . Nun die Ergebnisse:

Test A

W10 64-Bit, Google Chrome 64-Bit, nur IPv4

https://superuser.com Antwortheader:

accept-ranges:bytes cache-control:private content-encoding:gzip content-length:27980 content-security-policy-report-only:default-src https: wss: data: blob: 'unsafe-eval' 'unsafe-inline'; report-uri https://stackoverflow.report-uri.io/r/default/csp/reportOnly content-type:text/html; charset=utf-8 date:Sat, 18 Nov 2017 12:32:50 GMT status:200 strict-transport-security:max-age=15552000 vary:Accept-Encoding,Fastly-SSL via:1.1 varnish x-cache:MISS x-cache-hits:0 x-dns-prefetch-control:off x-frame-options:SAMEORIGIN x-request-guid:e8e35c63-8ada-4304-9775-518e2c94493a x-served-by:cache-hhn1546-HHN x-timer:S1511008370.083090,VS0,VE93 

Netzwerkmonitor:

168 KB 162 KB 

Der erste Wert ist die komprimierte Größe und ist größer als die unkomprimierte Größe. Warum unterscheidet es sich von content-length?

https://cdn.sstatic.net/Js/stub.en.js?v=50f40f106ebf Antwortheader:

accept-ranges:bytes age:155455 cache-control:max-age=604800 content-encoding:gzip content-length:13501 content-type:application/javascript date:Sat, 18 Nov 2017 12:32:50 GMT etag:"06eea28ff5ed31:0" last-modified:Thu, 16 Nov 2017 17:20:12 GMT status:200 vary:Accept-Encoding,Accept-Encoding via:1.1 varnish x-cache:HIT x-cache-hits:51733 x-served-by:cache-hhn1543-HHN x-timer:S1511008370.272246,VS0,VE0 

Netzwerkmonitor:

13.3 KB 38.2 KB 

Das sieht richtig aus.

Test B

W10 64-Bit, Google Chrome 62-Bit, nur IPv6 (anderer Ort eines Freundes)

https://superuser.com Antwortheader

Accept-Ranges:bytes Cache-Control:private Connection:keep-alive Content-Length:101440 Content-Security-Policy-Report-Only:default-src https: wss: data: blob: 'unsafe-eval' 'unsafe-inline'; report-uri https://stackoverflow.report-uri.io/r/default/csp/reportOnly Content-Type:text/html; charset=utf-8 Date:Sat, 18 Nov 2017 12:34:04 GMT Set-Cookie:prov=48760143-4086-135d-440f-590d1ece722d; domain=.superuser.com; expires=Fri, 01-Jan-2055 00:00:00 GMT; path=/; HttpOnly Strict-Transport-Security:max-age=15552000 Vary:Accept-Encoding,Fastly-SSL Via:1.1 varnish X-Cache:MISS X-Cache-Hits:0 X-DNS-Prefetch-Control:off X-Frame-Options:SAMEORIGIN X-Request-Guid:acf51572-2f08-4ef0-9695-d7217182eb1c X-Served-By:cache-hhn1533-HHN X-Timer:S1511008444.161788,VS0,VE102 

Netzwerkmonitor:

99.9 KB 99.1 KB 

https://cdn.sstatic.net/Js/stub.en.js?v=50f40f106ebf Antwortheader:

Accept-Ranges:bytes Age:155530 Cache-Control:max-age=604800 Connection:keep-alive Content-Length:39076 Content-Type:application/javascript Date:Sat, 18 Nov 2017 12:34:05 GMT ETag:"06eea28ff5ed31:0" Last-Modified:Thu, 16 Nov 2017 17:20:12 GMT Vary:Accept-Encoding,Accept-Encoding Via:1.1 varnish X-Cache:HIT X-Cache-Hits:52224 X-Served-By:cache-hhn1529-HHN X-Timer:S1511008445.494412,VS0,VE0 

Netzwerkmonitor:

38.6 KB 38.2 KB 

Nun fehlt der gzip-Inhalt vollständig, obwohl der Browser nach einer komprimierten Website fragt:

GET / HTTP/1.1 Host: superuser.com Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 Upgrade-Insecure-Requests: 1 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Accept-Encoding: gzip, deflate, br Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7 

Stimmt der Netzwerkmonitor in Google Chrome nicht? Und was könnte der Grund sein, warum Test B keine gzip-Version von superuser.com erhält?

1
Sieht aus wie ein Fehler. [Warum funktioniert Gzip nicht in Chrome? - Stack Overflow] (https://stackoverflow.com/questions/47304354/why-does-gzip-not-work-on-chrome) - Ich kann das Problem in meinem System wiederholen. [763700 - DevTools: Die komprimierte HTML-Dokumentgröße ist nicht korrekt - Chrom - Monorail] (https://bugs.chromium.org/p/chromium/issues/detail?id=763700) Win32Guy vor 6 Jahren 0
Siehe auch: https://stackoverflow.com/a/40968164 Win32Guy vor 6 Jahren 0
Möchtest du eine Antwort posten? Beide Links haben mein Problem gelöst. Der Fehler ist die Antwort auf Test A und die Deinstallation von Bitdefender Anti-Virus gelöst Test B. mgutt vor 6 Jahren 0
Wird besorgt. Ich bin froh, dass das geholfen hat. Win32Guy vor 6 Jahren 0

1 Antwort auf die Frage

1
Win32Guy