Does @import in CSS result in additional http requests?

前端 未结 6 1664
北海茫月
北海茫月 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:38

    Yeah you will go back to a request per each stylesheet while using @import.

    Your best bet is to minify and consolidate the css into a single file for deployment. But you can still develop with seperate files.

提交回复
热议问题