]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added application cache support to really make things zippy!
authorEvan Winslow <evan.b.winslow@gmail.com>
Wed, 4 Aug 2010 07:51:25 +0000 (07:51 +0000)
committerEvan Winslow <evan.b.winslow@gmail.com>
Wed, 4 Aug 2010 07:51:25 +0000 (07:51 +0000)
cache.manifest.php [new file with mode: 0644]
views/default/page_elements/header.php

diff --git a/cache.manifest.php b/cache.manifest.php
new file mode 100644 (file)
index 0000000..db963ae
--- /dev/null
@@ -0,0 +1,32 @@
+<?php\r
+header("Content-type: text/cache-manifest");\r
+\r
+require_once dirname(dirname(dirname(__FILE__))).'/engine/start.php';\r
+\r
+global $CONFIG;\r
+\r
+$viewtype = get_input('viewtype', 'default');\r
+\r
+$manifest = <<<MANIFEST\r
+CACHE MANIFEST\r
+# Viewtype:  $viewtype\r
+# Lastcache: {$CONFIG->lastcache}\r
+\r
+CACHE:\r
+# CSS\r
+{$CONFIG->url}_css/css.css?lastcache={$CONFIG->lastcache}&viewtype=$viewtype\r
+\r
+# Scripts\r
+{$CONFIG->url}vendors/jquery/jquery-1.3.2.min.js\r
+{$CONFIG->url}vendors/jquery/jquery-ui-1.7.2.min.js\r
+{$CONFIG->url}vendors/jquery/jquery.form.js\r
+{$CONFIG->url}vendors/jquery/jquery.easing.1.3.packed.js\r
+{$CONFIG->url}_css/js.php?js=initialise_elgg&viewtype=$viewtype&lastcache={$CONFIG->lastcache}\r
+{$CONFIG->url}_css/js.php?js=friendsPickerv1&viewtype=$viewtype&lastcache={$CONFIG->lastcache}\r
+\r
+NETWORK:\r
+*\r
+\r
+MANIFEST;\r
+\r
+echo $manifest;
\ No newline at end of file
index a69f79cbabbd523ce4212723e0e6cbd71f4d16df..65166c3dc6a56dd68af8ce2d788fe25b8ca0a010 100644 (file)
@@ -52,7 +52,7 @@ $version = get_version();
 $release = get_version(true);\r
 ?>\r
 <!doctype html>\r
-<html>\r
+<html manifest="<?php echo $vars['url']; ?>mod/html5/cache.manifest.php?viewtype=<?php echo $vars['view']; ?>">\r
 <head>\r
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r
        <meta name="ElggRelease" content="<?php echo $release; ?>" />\r