Practical AppCache Strategies

 Oct, 14 - 2014   no comments   How To

The Application Cache spec provides us with a very useful tool for enabling offline access to assets. This allows us to build web apps that can function whether or not the browser has an HTTP connection. AppCache is not a complete solution for offline apps, and it’s received some criticism for the fact that some […]


Continue Reading


It appears that Safari 5 will not respect the base href tag when used in a page served via https when the base href indicates a URL with the http protocol. There is probably more to this issue, but I ran across it while working on an Authorize.net integration using their SIM API. After a […]


Continue Reading


Smarty File Size Modifier

 May, 02 - 2009   4 comments   How To

Here’s a simple Smarty modifier that will format an integer that represents the number of bytes in a file as a human readable string. Usage: {$fileSizeInBytes|file_size} Example: {assign var=fileSizeInBytes value=10485760} {$fileSizeInBytes|file_size} {assign var=fileSizeInBytes value= 768000} {$fileSizeInBytes|file_size} {assign var=fileSizeInBytes value=303} {$fileSizeInBytes|file_size} Output: 10 MB 750 Kb 303 bytes <?php /** * Smarty plugin * @package Smarty […]


Continue Reading


When deploying LAMP projects, quite often we find ourselves being given access to a newly installed server with distribution-specific default configurations, which are usually very stripped down. Our Carbon Content Management Toolkit, which runs on top of the Zend Framework, uses the PDO_MYSQL driver for data access, along with a few other modules that are […]


Continue Reading