DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: Cache Control Header¶
Created: | 2010-02-18T17:33:18 |
---|---|
Changed by: | Jean-David Gadina |
Changed: | 2010-05-20T15:07:19 |
Classification: | cache_control_header |
Description: | The keywords help with categorizing and tagging of the manuals. You can combine two or more keywords and add additional keywords yourself. Please use at least one keyword from both lists. If your manual is NOT in english, see next tab "language" ---- forEditors (use this for editors / german "Redakteure") forAdmins (use this for Administrators) forDevelopers (use this for Developers) forBeginners (manuals covering TYPO3 basics) forIntermediates (manuals going into more depth) forAdvanced (covering the most advanced TYPO3 topics) see more: http://wiki.typo3.org/doc_template#tags ---- |
Keywords: | cache, header, proxy |
Author: | Jean-David Gadina |
Email: | macmade@netinfluence.com |
Info 4: | |
Language: | en |
EXT: Cache Control Header - cache_control_header
EXT: Cache Control Header¶
Extension Key: cache_control_header
Language: en
Keywords: cache, header, proxy
Copyright 2000-2010, Jean-David Gadina, <macmade@netinfluence.com>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.org
Table of Contents¶
`Introduction 3 <#1.1.Introduction|outline>`_
`Users manual 4 <#1.2.Users%20manual|outline>`_
`Administration 5 <#1.3.Administration|outline>`_
`Configuration 6 <#1.4.Configuration|outline>`_
`Tutorial 7 <#1.5.Tutorial|outline>`_
`Known problems 8 <#1.6.Known%20problems|outline>`_
`To-Do list 9 <#1.7.To-Do%20list|outline>`_
`ChangeLog 10 <#1.8.ChangeLog|outline>`_
Introduction¶
What does it do?¶
This extension allows a fine tuning of the Cache-Control HTTP header, in order to solve problems when accessing the TYPO3 frontend from behind an HTTP proxy server.
A proxy server is a server (hardware and/or software) that acts as an intermediary between clients and other servers. When a client issues a request to access resources from a server, the request is made to the proxy, which will then obtain the resource from the target server, and serve it back to the client.
When accessing a resource, the proxy server may, depending on its configuration and rules, modify the original server response and/or cache it, so it will be able to serve it for other clients without having to contact the target server for each request.
That caching behavior may be a source of problems for sites with a lot of dynamic data and with user connections. For instance, it may cache the profile page of a connected website user. In such a case, the proxy server may serve that cached page to other connected users.
The HTTP protocol specification allows the use of a specific header, to tell the proxy servers how to handle a response (mainly if it can be cached or not). That header is called 'Cache-Control':
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
By default, TYPO3 can be configured by TypoScript to add the 'Control- Cache' header to the server response, depending on whether a frontend user is logged (config.sendCacheHeaders - http://typo3.org/documentation/document- library/references/doc_core_tsref/4.1.0/view/7/3/ ).
Unfortunately, that TypoScript option only allows switching from the public directive to the private one, if a fronted user is connected.
The HTTP protocol allows more than just those two directives. The 'Control-Cache' header can be set to:
- public
- private
- no-cache
- no-store
- no-transform
- must-revalidate
- proxy-revalidate
Please see the RFC 2616 to learn more about the meaning of those different values.
This extension allows you to set the 'Cache-Control' header to all of these different values, depending on whether a frontend user is connected.
Additionally, it allows those values to be set easily for each page through the TYPO3 backend interface.
Screenshots¶
Users manual¶
Installation¶
In order to use this extension, simply download it from the TYPO3 extension repository, and install it.
It does not depend on any other extension.
Default values¶
Once installed, the extension is immediately active.
By default, the 'Cache-Control' header won't be set if no frontend user is connected. If a frontend user is logged, it will be set to 'private'.
You can change those default values in your TypoScript template, or through the TypoScript constants editor. Please see the administration and configuration sections to lear more about this.
Individual page settings
Each page can also be configured to have specific and independent settings. In order to do that, simply edit the properties of a page. In the 'Extended' tab, you will notice two additional fields:
Administration¶
The default values for a TYPO3 website can be set visually from the TypoScript constants editor:
Configuration¶
Reference¶
directive¶
Property
directive
Data type
int+
Description
The default directive to set when no frontend user is connected.
Possible values are:
1 – None (do not add the 'Cache-Control' header)
2 – Public
3 – Private
4 – No cache
5 – No store
6 – No transform
7 – Must revalidate
8 – Proxy revalidate
Default
1
directive_feuser¶
Property
directive_feuser
Data type
int+
Description
The default directive to set when a frontend user is connected.
Please see the previous entry for the possible values.
Default
3
[tsref:plugin.tx_cachecontrolheader_pi1.]
Tutorial¶
Nothing here... : )
Known problems¶
None at the current time. Please contact me by email if you are experiencing problems with this extension.
To-Do list¶
Nothing at the current time. Please contact me by email if you have suggestions for this extension.