I understand that CSS style sheets are cached in browser. My question is, why? CSS is usually only kilobytes, so what is the benefit of caching something that small when it can prove so bothersome to update? My only guess is that browsers like CSS to be loaded before HTML so unstyled elements are not flashed.
Asked
Active
Viewed 74 times
0
-
3[High speed, low latency](http://compnetworking.about.com/od/speedtests/a/network_latency.htm). The less HTTP requests you make, the faster page is. – Hauleth Jan 24 '14 at 14:19
-
So tl;dr are you basically saying that it's not the CSS that the browser takes a while downloading, but the HTTP request it has to make that can make a webpage slow? – Alexander Lozada Jan 24 '14 at 14:23
2 Answers
2
Every CSS file is a HTTP request. Many requests means slower page loading. Browsers developers cannot be sure that the websites developers will create one minimized CSS file with less useless lines. Often websites contains dozens of css files, sometimes there are not kilobytes but megabytes. So the CSS caching part is really in service of websites developers.

Liam James
- 414
- 1
- 6
- 15