I referenced angular.min.js
file from google CDN at http://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.min.js
in my web page. When I opened the page in IE and look at the Network tab, it shows the file size is 104.16 KB
but when I open the same webpage in FireFox and look at the FireBug, it shows the file size is 38.3 KB
.
Is it because of the compression and gzip? If it is, how does it differ by browser?
Yes.
If you save the text of the JavaScript file, the file size is 105KB (according to Windows). Zipping the same file yields an archive of 39KB.
To answer your question for how it differs by browser, my copy of IE11 sends an Accept-Encoding
header of gzip/deflate
. If your browser isn't sending that header, then the server won't zip the response.
**Edit**
IE10 sends an Accept-Encoding
header of gizp/deflate
and receives a zipped stream, but reports only the uncompressed size.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With