Skip to content

Commit

Permalink
For test html5 "cache manifest"
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Aug 26, 2011
1 parent e4ee35b commit 44eebec
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
30 changes: 30 additions & 0 deletions htdocs/cache.manifest
@@ -0,0 +1,30 @@
# version 1

# Files listed under CACHE will be cached after they are loaded;
# while the ones under NETWORK are said to be white-listed.
# What this means is that they require a live connection to the server.
# If the user isn't connected to the server, the browser should not use the cached version instead.

CACHE MANIFEST

CACHE:
index.php
main.inc.php
master.inc.php
filefunc.inc.php
lib/functions.lib.php

# The NETWORK section contains the path to a folder to ensure that requests
# to load resources contained under /api will bypass the cache and always fetch the resource from the server.

NETWORK:
# search.php
# login.php
# /api

# The FALLBACK section contains entries that provide a backup strategy.
# If the browser is unable to retrieve the original content, the fallback resource will be used.
# In the example above, we display a static image in case the dynamic one is unavailable.

FALLBACK:
# images/dynamic.php static_image.png
5 changes: 3 additions & 2 deletions htdocs/main.inc.php
Expand Up @@ -26,7 +26,7 @@
* \file htdocs/main.inc.php
* \ingroup core
* \brief File that defines environment for Dolibarr pages only (variables not required by scripts)
* \version $Id: main.inc.php,v 1.773 2011/08/24 06:52:08 eldy Exp $
* \version $Id: main.inc.php,v 1.774 2011/08/26 14:11:35 hregis Exp $
*/

@ini_set('memory_limit', '64M'); // This may be useless if memory is hard limited by your PHP
Expand Down Expand Up @@ -836,7 +836,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
//print '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
//print '<!DOCTYPE html>';
print "\n";
print "<html>\n";
if (! empty($conf->global->MAIN_USE_CACHE_MANIFEST)) print '<html manifest="cache.manifest">'."\n";
else print '<html>'."\n";
//print '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">'."\n";
if (empty($disablehead))
{
Expand Down

0 comments on commit 44eebec

Please sign in to comment.