GZip handling |
[eluser]shadow player[/eluser]
Hi I just checked out how CI handles gzip compression in the 'Output.php' core library. There's a better solution for enabling gZip compression or not, without having to mess with headers: Code: if(!ob_start('ob_gzhandler')) ob_start(); Apache itself will check the browser for gzip support and if it's not supported: Code: ob_start('ob_gzhandler'); This will emprove perfomance for compressed pages. It may also be a good idea to leave this enabled by default, I have used it in tons of PHP scripts and never have had any trouble. Best regards Tom
[eluser]InsiteFX[/eluser]
ob_start will interfere with the Output Class! I had an ob_start at the beginning of one of my pages and it refused to display {elapsed_time} and {memory_usage} InsiteFX
[eluser]shadow player[/eluser]
That's obvious... you can't start more than one OB. But the code I'm posting is ment for the Output Class to use, not for the user.
[eluser]InsiteFX[/eluser]
You can extend the Output Class and add your code to it. application/core/MY_Output.php InsiteFX
[eluser]shadow player[/eluser]
I'm not trying to implement it, I know that it works. I'm proposing this solution to be included in the code of a future version of CI...
[eluser]InsiteFX[/eluser]
Then you need to add it on the Reactor User Voice or it will never even get looked at! CodeIgniter - Reactor User Voice InsiteFX
[eluser]shadow player[/eluser]
[quote author="InsiteFX" date="1302473789"]Then you need to add it on the Reactor User Voice or it will never even get looked at! CodeIgniter - Reactor User Voice InsiteFX[/quote] Thank you very much =) |
Welcome Guest, Not a member yet? Register Sign In |