News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SmartyCode.com:
Enable your Zend Framework App with Conditional GET! (Make it green)
March 26, 2009 @ 14:25:59

On the SmartyCode.com site there's a quick new post about making your Zend Framework site a bit more "green" with a conditional GET feature.

In this article I'll show you a simple approach to enable your Zend Framework application saving lots of precious bandwidth, and thus, making it more end-users friendly, and save on bandwidth costs. This technique involves HTTP conditional GET. This is basically a feature of the HTTP protocol. By sending correct HTTP headers with your application, you enable browsers of your end users to cache pages of your site.

A plugin for the front controller (with a dispatchLoopShutdown method inside) is used to handle the requests and cache their content correctly. They have the cache set at 7200 seconds (2 hours) for a time to live, but its easy to tweak it based on your application. TO use the plugin call the registerPlugin function on the controller object and add it as the very last thing that runs.

0 comments voice your opinion now!
conditional get cache timetolive zendframework dispatchloopshutdown


blog comments powered by Disqus

Similar Posts

Michelangelo van Dam's Blog: Unit testing after Zend Framework 1.8 webinar

Community News: Book Release: "Easy PHP Websites with the Zend Framework" (W. Jason Gilmore)

Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)

Rob Allen's Blog: A Tutorial Update & Extending ViewRenderer to Support Layout Templates

Federico Cargnelutti's Blog: Zend Framework DAL: DAOs and DataMappers


Community Events





Don't see your event here?
Let us know!


series laravel language interview podcast introduction symfony library deployment conference tips developer api zendserver community release framework list opinion bugfix

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework