![]() |
Caching and headers - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Caching and headers (/showthread.php?tid=9872) |
Caching and headers - El Forum - 11-17-2008 [eluser]narkaT[/eluser] [quote author="Arjen van Bochoven" date="1226978818"]I've spoken too soon, I forgot Call-time pass-by-reference" is deprecated, so to make this work we have to change the function definition of _display()[/quote] you're right. I wonder why my tests not triggered any warnings, I used a "recent php version" for that. the manual says that a warning message should have been generated. [quote author="Arjen van Bochoven" date="1226978818"]I don’t know if adding the ref is breaking something (php4, anybody?)[/quote] I've found some interesting comment in the manual. taking that into account the following would not work for php4 Code: function _display(&$output = '') tricky... :roll: Caching and headers - El Forum - 11-17-2008 [eluser]Henry Weismann[/eluser] This is exactly what I was looking for! I am building my applications to load views in a css view folder and output it as css after minimizing it and dynamically setting expire headers. In the end it makes one nice cached, minimized css file and a single http request. I did the same for JavaScript. Does anybody know if I can set it to be gzipped as well and how that will interact with caching? Caching and headers - El Forum - 11-18-2008 [eluser]Arjen van Bochoven[/eluser] [quote author="hcamelion" date="1227005591"]Does anybody know if I can set it to be gzipped as well and how that will interact with caching?[/quote] If you set Code: $config['compress_output'] = TRUE; Caching and headers - El Forum - 11-18-2008 [eluser]Aquillyne[/eluser] [quote author="hcamelion" date="1227005591"]This is exactly what I was looking for! I am building my applications to load views in a css view folder and output it as css after minimizing it and dynamically setting expire headers. In the end it makes one nice cached, minimized css file and a single http request. I did the same for JavaScript. Does anybody know if I can set it to be gzipped as well and how that will interact with caching?[/quote] Would you mind sharing your code for the CSS minimization, and your javascript view?? Caching and headers - El Forum - 06-23-2009 [eluser]Phil Sturgeon[/eluser] Time for a little resurrection. I posted here pointing out a few of my concerns with this header caching method. It is clearly an improvement over the core Output library, but it still has a little way to go until it is perfectly usable in all situations. Perhaps storing the Content type header as part of the md5 hash would be an idea? Caching and headers - El Forum - 01-22-2010 [eluser]pacifika[/eluser] Thanks this is very useful to me, I am parsing an external page then retrieving content of an image on that page, now I can cache the image content and serve it without issues. Caching and headers - El Forum - 06-04-2012 [eluser]vrencianz[/eluser] This thread is old but the MY_Output class is still useful. For Codeigniter 2.1.0 this override neds only few mods: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |