Preventing Joomla! from sending no-cache in headers
If you are using Joomla! 1.5+ and trying to cache with nginx or other caching server and at same time you don’t want to use Joomla! system cache plugin. You’ll face a big problem, that Joomla! is sending “Cache-Control: no-cache” and “Pragma: no-cache” in response headers.
Here’s the solution :
1. Edit the following file :
Joomla root/libraries/joomla/environment/response.php
2. Search for the following code :
if (self::allowCache() === false) {
self::setHeader('Cache-Control', 'no-cache', false);
// HTTP 1.0
self::setHeader('Pragma', 'no-cache');
}
3. Comment this if condition, to be as follows
/*
if (self::allowCache() === false) {
self::setHeader('Cache-Control', 'no-cache', false);
// HTTP 1.0
self::setHeader('Pragma', 'no-cache');
}
*/
Now, you can disable Joomla! caching, and run whatever caching server, as nginx.
PHP Coding Standards
I’d been writing PHP Code for about 5 years ago
!! at 1st I started by some short tutorials then went for trial & error and ofcourse the help of Waleed Gad, later on I started to read many books and my Programming level started to be near professional , but each time I was looking for coding standards. 2 days ago by chance I did a search and I found a lot of useful links that I wanted to share with you !
- PHP Coding Standards text file (Found on their CVS)
- PEAR coding standards
- Zend Framework coding standard
- Typo3 general php practices
- WordPress coding style guidelines
- phpbb3 group coding guidelines
- Buxaprojects php coding guidelines
- evolt.org php coding guidelines
- BlackGate php coding guidelines
- Blueshoes coding guidelines
- OpenClinic coding guidelines
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Recent Posts
Recent Comments
- modsaid on CEO Vs. CEO
- modsaid on CEO Vs. CEO
- Mahmoud M. Abdel-Fattah on CEO Vs. CEO
- she7ata on CEO Vs. CEO
- Mayada on CEO Vs. CEO




