css,
for example.
Although @import rules can appear
in any style sheet, they must appear
at the very top of a style sheet,
before any other CSS rules, or they
are ignored.
STYLIN??™ WITH CSS - CHAPTER 7 242
Site Performance
Organizing your styles across multiple style sheets can really help you manage the numerous styles for your sites.
However, don??™t split up your CSS for any given page into a very large number of style sheets. If you load more than say,
?¬? ve style sheets per page, even if they are not very big in kilobytes individually, you may start to see a slower page load
performance. Often, more time is required to send the request and establish the connection for each ?¬? le transfer than the
time spent actually moving the data itself from server to browser. If you think this is happening, baseline the download
speed with the multiple style sheets using Firebug (a debugging add-on for your Firefox browser??”search www.get?¬? refox.
com > Add-ons). Then copy all the styles into one style sheet, link your page to only that one style sheet, and measure
again. If you see a noticeable difference, then you might want to start consolidating your styles into fewer style sheets.
However, there are a number of other factors that affect page rendering times??”that is, the time between pressing the
Enter key or clicking a link, and the page being fully displayed in the browser.
Pages:
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284