Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Script file size difference in IE and FF [closed]

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?

like image 831
Asdfg Avatar asked Nov 10 '22 04:11

Asdfg


1 Answers

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.

like image 170
Jesan Fafon Avatar answered Nov 14 '22 22:11

Jesan Fafon