22 Mai 2012, 08:42:59 *
Willkommen Gast. Bitte einloggen oder registrieren.
Haben Sie Ihre Aktivierungs E-Mail übersehen?

Einloggen mit Benutzername, Passwort und Sitzungslänge
 
   Übersicht   Hilfe Suche Einloggen Registrieren  
Seiten: [1]   Nach unten
  Drucken  
Autor Thema: Pagespeed neue Regel - Avoid CSS @import  (Gelesen 2164 mal)
0 Mitglieder und 1 Gast betrachten dieses Thema.
piratos
Stammposter
***
Beiträge: 175


« am: 24 Oktober 2010, 13:05:00 »

Eine interessante Sache ist die neue (ab 1.9.1) Regel Avoid CSS @import - das ist etwas was enorm vebreitet ist, aber fatale Auswirkungen hat:


Zitat
Using CSS @import in an external stylesheet can add additional delays during the loading of a web page.
Details

CSS @import allows stylesheets to import other stylesheets. When CSS @import is used from an external stylesheet, the browser is unable to download the stylesheets in parallel, which adds additional round-trip times to the overall page load. For instance, if first.css contains the following content:

@import url("second.css")

The browser must download, parse, and execute first.css before it is able to discover that it needs to download second.css.
Recommendations

Use the <link> tag instead of CSS @import
    Instead of @import, use a <link> tag for each stylesheet. This allows the browser to download stylesheets in parallel, which results in faster page load times:

    <link rel="stylesheet" href="first.css">
    <link rel="stylesheet" href="second.css">

facebook-like.png Gespeichert
Tags: Pagespeed 
Seiten: [1]   Nach oben
  Drucken  
 
Gehe zu:  


Powered by SMF 1.1.16 | SMF © 2006, Simple Machines | Impressum | Datenschutz
Seite erstellt in 0.044 Sekunden mit 19 Zugriffen.