Mod Name / Version: Allow Visited Pages To Be Cached By Browser
Description: Some hosts use an HTTP header which prevents already visited forum pages from being cached by your browser.
Thus, when you use the back/forward browser buttons, you will need to reload every single page fresh again, which greatly slows down forum browsing for dial-up users when jumping in and out of threads, as well as increases bandwidth usage.
This mod will allow you to override their HTTP header with your own, which does permit caching.
All clicked on links will still always load fresh - that functionality won't be affected whatsoever. This way the *user* can decide if they wish to draw from their cache or reload from the server.
Many hosts already use the following configuration by default, but for those that don't (eRoute for example), here's the fix...
Working Under: UBB.Threads 6.2-6.3-6.4-6.5
Mod Status: Finished
Any pre-requisites: none
Author(s): Twisty
Date: 11/27/03
Credits: none
Files Altered: templates/default/ubbt_header.tmpl
New Files: none
Database Altered: no
Info/Instructions: Change ubbt_header.tmpl
FROM THIS:
<? //UBBTREMARK <br />echo <<<UBBTPRINT <br /><!-- START OF header.tmpl TEMPLATE --> <br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br /><html dir="{$ubbt_lang['READ_DIRECTION']}"> <br /><head> <br />$headerinsert <br />$refresh <br /><meta http-equiv="Content-Type" content="text/html; charset={$ubbt_lang['CHARSET']}" /> <br /><link rel="stylesheet" href="$stylesheet" type="text/css" /> <br /><link rel="shortcut icon" href="{$config['images']}/favicon.ico" /> <br />$javascript <br /><title>{$config['title']}: $inputTitle</title> <br /></head> <br /><body> <br /><!-- END OF header.tmpl TEMPLATE --> <br />UBBTPRINT <br />/* UBBTREMARK */ ?>
TO THIS:
<? //UBBTREMARK <br />header("Pragma: private"); <br />header("Expires: 0"); <br />header("Cache-Control: private, post-check=0, pre-check=0"); <br />echo <<<UBBTPRINT <br /><!-- START OF header.tmpl TEMPLATE --> <br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br /><html dir="{$ubbt_lang['READ_DIRECTION']}"> <br /><head> <br />$headerinsert <br />$refresh <br /><meta http-equiv="Content-Type" content="text/html; charset={$ubbt_lang['CHARSET']}" /> <br /><link rel="stylesheet" href="$stylesheet" type="text/css" /> <br /><link rel="shortcut icon" href="{$config['images']}/favicon.ico" /> <br />$javascript <br /><title>{$config['title']}: $inputTitle</title> <br /></head> <br /><body> <br /><!-- END OF header.tmpl TEMPLATE --> <br />UBBTPRINT <br />/* UBBTREMARK */ ?>
:-)
Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.