Does @import in CSS result in additional http requests?

前端 未结 6 1695
北海茫月
北海茫月 2020-12-19 00:09

I have an ecommerce site that has about 8 CSS files linked from the header - resulting in 8 separate http requests to the server. I consolidated all the CSS files into 1 big

6条回答
  •  被撕碎了的回忆
    2020-12-19 00:16

    The browser has to get the data somehow, so how could it not use another http request? ;-)

    It's also possible though, that you'll benefit from browser caching if you're only changing one file and the other seven are unchanged.

    You might try sniffing a connection between a client and the server and see what it requests.

提交回复
热议问题