[ubuntu-web] Jaunty countdown banner - PHP version

tacone tacone at gmail.com
Sun Mar 29 15:41:28 BST 2009

2009/3/29 Steve Dodier <sidnioulz at gmail.com>:
> Hello Alexei,
> The idea of using a PHP script, even if it means load on a server, is that
> usually browsers don't cache .php files, while they massively cache images.
> That's why we also use .js / iframes for rendering the countdown image : a
> direct link to an image will be cached in the users' browsers and they may
> get a wrong release date in mind because of that.
> Anyways, since the script works on any PHP 5.1 server, webmasters that don't
> want to get it from an overloaded server can just host a copy of the
> countdown.php file ;)

An easy solution for the overload would be to use an http redirect
instead of readfile (browser follow redirect even for images). That
way the overhead on the server would be minimal, and the bandwith used
for displaying the images would be just Canonical's (currently you use
both Canonical's and yours).

I blogged the code to embed your script in the pages, hope you don't
mind. Seems like a great thing for the folks which use wordpress.com
and similar services.


More information about the Ubuntu-website mailing list