[Rt-commit] rt branch, 4.2/frontend-peformance-tweaks, created. rt-4.2.3-61-gfb6227a
Wallace Reis
wreis at bestpractical.com
Fri Mar 28 09:48:58 EDT 2014
The branch, 4.2/frontend-peformance-tweaks has been created
at fb6227a3814ee49992a6c0b9d12cb1100d8e9ca2 (commit)
- Log -----------------------------------------------------------------
commit 3e8abba0ad1e509636a1b75a82da12b048b83904
Author: Wallace Reis <wreis at bestpractical.com>
Date: Fri Feb 7 04:42:21 2014 -0800
Optimize some images
Saved around 2KB.
diff --git a/share/static/images/bpslogo.png b/share/static/images/bpslogo.png
index 8a87374..23fa731 100644
Binary files a/share/static/images/bpslogo.png and b/share/static/images/bpslogo.png differ
diff --git a/share/static/images/eyedropper.png b/share/static/images/eyedropper.png
index 7b0431a..fc0d388 100644
Binary files a/share/static/images/eyedropper.png and b/share/static/images/eyedropper.png differ
commit fb6227a3814ee49992a6c0b9d12cb1100d8e9ca2
Author: Wallace Reis <wreis at bestpractical.com>
Date: Fri Mar 14 15:43:18 2014 -0300
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/Header b/share/html/Elements/Header
index b0b0717..a84e9d8 100644
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -56,14 +56,13 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- The X-UA-Compatible <meta> tag above must be very early in <head> -->
- <& /Elements/Framekiller &>
-
% 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" />
% }
@@ -71,13 +70,12 @@
% for (keys %{$LinkRel || {}}) {
<link rel="<% $_ %>" href="<% RT->Config->Get('WebPath') . $LinkRel->{$_} %>" />
% }
+<link rel="shortcut icon" href="<%RT->Config->Get('WebImagesURL')%>favicon.png" type="image/png" />
% if ( $RSSAutoDiscovery ) {
<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 &>
@@ -94,6 +92,10 @@
% # Leave %ARGS for backward compatibility
% $m->callback( %ARGS, CallbackName => 'Head', ARGSRef => \%ARGS );
+<& HeaderJavascript, focus => $Focus, onload => $onload, RichText => $RichText &>
+
+<& /Elements/Framekiller &>
+
</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
index 4b1abdb..f0f56b3 100644
--- a/share/html/Elements/HeaderJavascript
+++ b/share/html/Elements/HeaderJavascript
@@ -49,7 +49,6 @@
$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/m/_elements/header b/share/html/m/_elements/header
index 4674991..949de3e 100644
--- a/share/html/m/_elements/header
+++ b/share/html/m/_elements/header
@@ -55,12 +55,12 @@ $r->headers_out->{'Cache-control'} = 'no-cache';
</%init>
<html>
<head>
-<& /Elements/Framekiller &>
<link rel="stylesheet" type="text/css" href="<%RT->Config->Get('WebPath')%>/static/css/mobile.css"/>
<title><%$title%></title>
% my ($jquery) = grep { /^jquery-\d+\./ } RT::Interface::Web->JSFiles;
<script src="<% RT->Config->Get('WebPath') %>/static/js/<% $jquery %>"></script>
<meta name="viewport" content="width=device-width height=device-height user-scalable=yes"/>
+<& /Elements/Framekiller &>
</head>
<body>
% if ($show_home_button) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list