Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap.min.css size from cdn shows a surprising size in devtools

In firefox enter image description here

In chrome enter image description here

Could someone explain why the size in devtools is 24.5KB ?

I load the bootstrap from this cdn : bootstrap.min.css

ps: the cache was flushed during the test.

like image 392
vdegenne Avatar asked Mar 26 '15 20:03

vdegenne


1 Answers

TL;DR Firefox shows the decompressed file size, Chrome shows the compressed file size

To load pages faster and use less data most modern browsers download compressed versions of files from a WWW server. Let's make an experiment:

  • Download the bootstrap.min.css file
  • Compress it with gzip -k bootstrap.min.css
  • Compare the file sizes:
    • Compressed version: ~20KB
    • Uncompressed version: ~116KB

I belive that Firefox displays the decompressed file size and Chrome displays the size of the file, which it downloaded (compressed).

like image 139
pitastic Avatar answered Sep 28 '22 12:09

pitastic