[Rt-commit] rt branch, 4.2/frontend-peformance-tweaks, repushed
Wallace Reis
wreis at bestpractical.com
Wed Mar 26 11:33:09 EDT 2014
The branch 4.2/frontend-peformance-tweaks was deleted and repushed:
was 131462be91d725558602775c0aa929bdd3d157ab
now 27fcdec6bc1ca8b2c698e8b71e377c570874e39e
1: 4704c58 = 1: 3e8abba Optimize some images
2: 131462b ! 2: 27fcdec Optimize the ordering of resources
@@ -1,6 +1,11 @@
Author: Wallace Reis <wreis at bestpractical.com>
- Optimize the order of some JS
+ Optimize the ordering of resources
+
+ Correctly ordering stylesheets and scripts enables better parallelization
+ of downloads and speeds up browser rendering time.
+
+ https://developers.google.com/speed/docs/best-practices/rtt#PutStylesBeforeScripts
diff --git a/share/html/Elements/Footer b/share/html/Elements/Footer
--- a/share/html/Elements/Footer
@@ -42,6 +47,48 @@
% if ($Refresh && $Refresh =~ /^(\d+)/ && $1 > 0) {
% my $URL = $m->notes->{RefreshURL}; $URL = $URL ? ";URL=$URL" : "";
<meta http-equiv="refresh" content="<% "$1$URL" %>" />
+ % }
+
+-<link rel="shortcut icon" href="<%RT->Config->Get('WebImagesURL')%>favicon.png" type="image/png" />
++<& JavascriptConfig &>
++
+ % for my $cssfile ( @css_files ) {
+ <link rel="stylesheet" href="<%RT->Config->Get('WebPath')%><% $cssfile %>" type="text/css" media="all" />
+ % }
++<link rel="shortcut icon" href="<%RT->Config->Get('WebImagesURL')%>favicon.png" type="image/png" />
+
+ % for (keys %{$LinkRel || {}}) {
+ <link rel="<% $_ %>" href="<% RT->Config->Get('WebPath') . $LinkRel->{$_} %>" />
+@@
+ <link rel="alternate" href="<%$RSSAutoDiscovery%>" type="application/rss+xml" title="RSS RT Search" />
+ % }
+
+-<& HeaderJavascript, focus => $Focus, onload => $onload, RichText => $RichText &>
+-
+ % my $stylesheet_plugin = "/NoAuth/css/".$style."/InHeader";
+ % if ($m->comp_exists($stylesheet_plugin) ) {
+ <& $stylesheet_plugin &>
+@@
+ % # Leave %ARGS for backward compatibility
+ % $m->callback( %ARGS, CallbackName => 'Head', ARGSRef => \%ARGS );
+
++<& HeaderJavascript, focus => $Focus, onload => $onload, RichText => $RichText &>
++
+ </head>
+ <body class="<% lc $style %><% RT->Config->Get("UseSideBySideLayout", $session{'CurrentUser'}) ? ' sidebyside' : '' %>" <% $id && qq[id="comp-$id"] |n %>>
+
+
+diff --git a/share/html/Elements/HeaderJavascript b/share/html/Elements/HeaderJavascript
+--- a/share/html/Elements/HeaderJavascript
++++ b/share/html/Elements/HeaderJavascript
+@@
+ $focus => undef
+ $onload => undef
+ </%args>
+-<& JavascriptConfig &>
+
+ % for my $jsfile ( @js_files ) {
+ <script type="text/javascript" src="<%RT->Config->Get('WebPath')%><% $jsfile %>"></script>
diff --git a/share/html/Elements/PageLayout b/share/html/Elements/PageLayout
--- a/share/html/Elements/PageLayout
@@ -57,8 +104,7 @@
<div id="body">
% $m->callback( %ARGS, CallbackName => 'BeforeBody' );
% $m->flush_buffer(); # we've got the page laid out, let's flush the buffer;
-+
- <%ARGS>
+@@
$title => $m->callers(-1)->path
$show_menu => 1
</%ARGS>
More information about the rt-commit
mailing list