diff --git a/htdocs/cache.manifest b/htdocs/cache.manifest new file mode 100644 index 00000000000..9d7b4f8d58c --- /dev/null +++ b/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 \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 72e6428fbb1..08bfeb99349 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -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 @@ -836,7 +836,8 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs //print ''; //print ''; print "\n"; - print "\n"; + if (! empty($conf->global->MAIN_USE_CACHE_MANIFEST)) print ''."\n"; + else print ''."\n"; //print ''."\n"; if (empty($disablehead)) {