Permalink
Browse files

To bring back page loading performance in our working codebase and te…

…sting sites (as much as possible while including the entire framework with unminified code), this reinstates the concatenated index.php files for all CSS (theme + structure), and all JS (jQuery + jQM - all widgets). I've also removed the @import CSS file that was acting in place of the concatenated file. I edited the docs homepage (index.html) to link  to the concatenated JS and CSS. Every docs page will still need HEAD edits to relink up to these files in the same way. Added gzip output to the combine.php file, which will make things load much faster during testing.
  • Loading branch information...
1 parent 956075c commit f184cf6b187258a12c9ad38f3a59263f8591067c scottjehl committed Jan 17, 2012
Showing with 32 additions and 29 deletions.
  1. +3 −0 combine.php
  2. +26 −2 css/themes/default/index.php
  3. +0 −24 css/themes/default/jquery.mobile.css
  4. +2 −3 index.html
  5. +1 −0 js/index.php
View
3 combine.php
@@ -18,5 +18,8 @@
header('Content-Length: ' . strlen($contents));
header('Expires: Fri, 01 Jan 2010 05:00:00 GMT');
+//gzip it to speed up page load time (still not minified, for testing purposes)
+ob_start("ob_gzhandler");
+
// Deliver the file
echo $contents;
View
28 css/themes/default/index.php
@@ -2,6 +2,30 @@
$type = 'text/css';
$files = array(
'../../../LICENSE-INFO.txt',
- 'jquery.mobile.css'
+ 'jquery.mobile.theme.css',
+ '../../structure/jquery.mobile.core.css',
+ '../../structure/jquery.mobile.transitions.css',
+ '../../structure/jquery.mobile.transitions.fade.css',
+ '../../structure/jquery.mobile.transitions.pop.css',
+ '../../structure/jquery.mobile.transitions.slide.css',
+ '../../structure/jquery.mobile.transitions.slidedown.css',
+ '../../structure/jquery.mobile.transitions.slideup.css',
+ '../../structure/jquery.mobile.transitions.flip.css',
+ '../../structure/jquery.mobile.transitions.turn.css',
+ '../../structure/jquery.mobile.transitions.flow.css',
+ '../../structure/jquery.mobile.grids.css',
+ '../../structure/jquery.mobile.headerfooter.css',
+ '../../structure/jquery.mobile.navbar.css',
+ '../../structure/jquery.mobile.button.css',
+ '../../structure/jquery.mobile.collapsible.css',
+ '../../structure/jquery.mobile.controlgroup.css',
+ '../../structure/jquery.mobile.dialog.css',
+ '../../structure/jquery.mobile.forms.checkboxradio.css',
+ '../../structure/jquery.mobile.forms.fieldcontain.css',
+ '../../structure/jquery.mobile.forms.select.css',
+ '../../structure/jquery.mobile.forms.textinput.css',
+ '../../structure/jquery.mobile.listview.css',
+ '../../structure/jquery.mobile.forms.slider.css'
);
-$base = dirname(__FILE__);
+
+require_once("../../../combine.php");
View
24 css/themes/default/jquery.mobile.css
@@ -1,24 +0,0 @@
-@import url( "jquery.mobile.theme.css" );
-@import url( "../../structure/jquery.mobile.core.css" );
-@import url( "../../structure/jquery.mobile.transitions.css" );
-@import url( "../../structure/jquery.mobile.transitions.fade.css" );
-@import url( "../../structure/jquery.mobile.transitions.pop.css" );
-@import url( "../../structure/jquery.mobile.transitions.slide.css" );
-@import url( "../../structure/jquery.mobile.transitions.slidedown.css" );
-@import url( "../../structure/jquery.mobile.transitions.slideup.css" );
-@import url( "../../structure/jquery.mobile.transitions.flip.css" );
-@import url( "../../structure/jquery.mobile.transitions.turn.css" );
-@import url( "../../structure/jquery.mobile.transitions.flow.css" );
-@import url( "../../structure/jquery.mobile.grids.css" );
-@import url( "../../structure/jquery.mobile.headerfooter.css" );
-@import url( "../../structure/jquery.mobile.navbar.css" );
-@import url( "../../structure/jquery.mobile.button.css" );
-@import url( "../../structure/jquery.mobile.collapsible.css" );
-@import url( "../../structure/jquery.mobile.controlgroup.css" );
-@import url( "../../structure/jquery.mobile.dialog.css" );
-@import url( "../../structure/jquery.mobile.forms.checkboxradio.css" );
-@import url( "../../structure/jquery.mobile.forms.fieldcontain.css" );
-@import url( "../../structure/jquery.mobile.forms.select.css" );
-@import url( "../../structure/jquery.mobile.forms.textinput.css" );
-@import url( "../../structure/jquery.mobile.listview.css" );
-@import url( "../../structure/jquery.mobile.forms.slider.css" );
View
5 index.html
@@ -4,10 +4,9 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery Mobile: Demos and Documentation</title>
- <link rel="stylesheet" href="css/themes/default/jquery.mobile.css" />
+ <link rel="stylesheet" href="css/themes/default/" />
<link rel="stylesheet" href="docs/_assets/css/jqm-docs.css" />
- <script data-main="js/jquery.mobile.docs" src="external/requirejs/require.js"></script>
- <script src="js/jquery.js"></script>
+ <script src="js/"></script>
</head>
<body>
<div data-role="page" class="type-home">
View
1 js/index.php
@@ -1,6 +1,7 @@
<?php
$type = 'text/javascript';
$files = array(
+ 'jquery.js',
'../LICENSE-INFO.txt',
// note that define is only included here as a means
// to revert to the pre async include, and should not be

0 comments on commit f184cf6

Please sign in to comment.