vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17568: LJSUP-7149: change order of external js ...

Committer: vsukhanov
LJSUP-7149: change order of external js and css in html. Css first.
U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2010-10-15 02:10:40 UTC (rev 17567)
+++ trunk/cgi-bin/weblib.pl	2010-10-15 03:13:06 UTC (rev 17568)
@@ -1461,10 +1461,13 @@
         }
     };
 
+    ## To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript. 
+    ##  (C) http://code.google.com/speed/page-speed/
+    ##
+    $tags->("stccss",  "<link rel=\"stylesheet\" type=\"text/css\" href=\"$statprefix/___\" ##/>");
+    $tags->("wstccss", "<link rel=\"stylesheet\" type=\"text/css\" href=\"$wstatprefix/___\" ##/>");
     $tags->("common_js", "<script type=\"text/javascript\" src=\"$jsprefix/___\"></script>");
     $tags->("js",      "<script type=\"text/javascript\" src=\"$jsprefix/___\"></script>");
-    $tags->("stccss",  "<link rel=\"stylesheet\" type=\"text/css\" href=\"$statprefix/___\" ##/>");
-    $tags->("wstccss", "<link rel=\"stylesheet\" type=\"text/css\" href=\"$wstatprefix/___\" ##/>");
     $tags->("stcjs",   "<script type=\"text/javascript\" src=\"$statprefix/___\"></script>");
     $tags->("wstcjs",  "<script type=\"text/javascript\" src=\"$wstatprefix/___\"></script>");
 

Tags: livejournal, pl, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments