aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Winslow <evan.b.winslow@gmail.com>2010-08-04 07:51:25 +0000
committerEvan Winslow <evan.b.winslow@gmail.com>2010-08-04 07:51:25 +0000
commit9ab7cf5f022c699b3ebcb5fc2d11e30f24beb802 (patch)
treef0d674ccfd3054a4f13dd0371b002fd227709740
parent182e0ce5039262e5ec2afb9166ea10d8bacafffd (diff)
downloadelgg-9ab7cf5f022c699b3ebcb5fc2d11e30f24beb802.tar.gz
elgg-9ab7cf5f022c699b3ebcb5fc2d11e30f24beb802.tar.bz2
Added application cache support to really make things zippy!
-rw-r--r--cache.manifest.php32
-rw-r--r--views/default/page_elements/header.php2
2 files changed, 33 insertions, 1 deletions
diff --git a/cache.manifest.php b/cache.manifest.php
new file mode 100644
index 000000000..db963aeef
--- /dev/null
+++ b/cache.manifest.php
@@ -0,0 +1,32 @@
+<?php
+header("Content-type: text/cache-manifest");
+
+require_once dirname(dirname(dirname(__FILE__))).'/engine/start.php';
+
+global $CONFIG;
+
+$viewtype = get_input('viewtype', 'default');
+
+$manifest = <<<MANIFEST
+CACHE MANIFEST
+# Viewtype: $viewtype
+# Lastcache: {$CONFIG->lastcache}
+
+CACHE:
+# CSS
+{$CONFIG->url}_css/css.css?lastcache={$CONFIG->lastcache}&viewtype=$viewtype
+
+# Scripts
+{$CONFIG->url}vendors/jquery/jquery-1.3.2.min.js
+{$CONFIG->url}vendors/jquery/jquery-ui-1.7.2.min.js
+{$CONFIG->url}vendors/jquery/jquery.form.js
+{$CONFIG->url}vendors/jquery/jquery.easing.1.3.packed.js
+{$CONFIG->url}_css/js.php?js=initialise_elgg&viewtype=$viewtype&lastcache={$CONFIG->lastcache}
+{$CONFIG->url}_css/js.php?js=friendsPickerv1&viewtype=$viewtype&lastcache={$CONFIG->lastcache}
+
+NETWORK:
+*
+
+MANIFEST;
+
+echo $manifest; \ No newline at end of file
diff --git a/views/default/page_elements/header.php b/views/default/page_elements/header.php
index a69f79cba..65166c3dc 100644
--- a/views/default/page_elements/header.php
+++ b/views/default/page_elements/header.php
@@ -52,7 +52,7 @@ $version = get_version();
$release = get_version(true);
?>
<!doctype html>
-<html>
+<html manifest="<?php echo $vars['url']; ?>mod/html5/cache.manifest.php?viewtype=<?php echo $vars['view']; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="ElggRelease" content="<?php echo $release; ?>" />