In a recent web based project I had to write a good number of css files (combining upto ~40 KB). Currently I'm using the @import()
in the css file of the first page. Like:
@import url("reset.css");
@import url("input.css");
@import url("img.css");
@import url("menu.css");
@import url("home.css");
@import url("about.css");
@import url("detail.css");
@import url("contact.css");
@import url("solutions.css");
@import url("notices.css");
@import url("general.css");
Now there would be a good number of users using this from very slow internet connections (4~5 KBPS). So would it be better to use <link rel="stylesheet" type="text/css" href="cssFile.css">
? But according to my php coding, I need to @import
the first four files at least! Hoping for a better solution.
Another question related to this, does the browsers cache the css files all the time? If so, then all my css files get loaded on the first time and the user gets no hassle after the first time he logs into the site. Am I thinking the right way in that case?