Web Development Blog

Setting cookies in nginx

Oct 9th, 2011 - Elliott Brueggeman
Setting a cookie in nginx is easy. Look at the following example of setting the cookie lcid with the value 1033 when a page url starts with "/fr/": location ~* (^/fr/) { add_header Set-Cookie lcid=1033; # ...

Visitor Tracking with Redis and PHP

Sep 18th, 2011 - Elliott Brueggeman
A recent project had the requirement for detailed and instant visitor tracking integrated into the admin gui of a high traffic site.

Installing Apache mod_deflate and mod_expires on CentOS 5

Sep 14th, 2011 - Elliott Brueggeman
When installing Apache web server, it's a good idea to enable the mod_deflate and mod_expires modules. Mod_deflate enables Apache to serve compressed content which is then decoded by the receiving browser.

Installing Redis on CentOS 5.6

Sep 11th, 2011 - Elliott Brueggeman
Redis is a high performance key-value store that can be easily integrated with a variety of applications. Redis can handle many inserts (sets) by keeping newly added values in memory and writing them to disk over time. To install Redis on CentOS 5.6, run the following commands as root.

Drupal Memcache and APC caches compared

Sep 6th, 2011 - Elliott Brueggeman
Highly scalable Drupal sites require a caching solution more robust than the default database-backed cache. In-memory storage is very popular because of its performance and relatively easy installation, and Memcache and APC seem to be the two most popular options. Drupal Integration

Drupal's optimize CSS and JavaScript setting causing problems in multiple server environments

Aug 30th, 2011 - Elliott Brueggeman
There's a common Drupal setting that allows you to optimize and JavaScript or CSS in the Site Configuration > Performance menu. Turning this setting on will minify and concatenate all of these used files into a single JavaScript and single CSS file.

Using PHP 5’s SPL Autoloading with Code Igniter

Aug 2nd, 2010 - Elliott Brueggeman
One of the cooler features in PHP 5 is the SPL autoloading capability, which allows dynamic loading of classes without you having to “include” or “require” each specific one.

Drupal Pressflow and Limelight CDN integration

Jul 25th, 2010 - Elliott Brueggeman
After quite a few failed attempts the get Limelight origin-pull CDN integration to work with a new Drupal Pressflow 6 site that I’ve been working on, I finally reached the magic combination of Drupal and Apache settings.

Testing Database Replication in the Drupal Pressflow Build (Updated June 26, 2010)

Jun 27th, 2010 - Elliott Brueggeman
Pressflow, a high performance version of Drupal, supports master slave setups in its database include files.

Wordpress rel=”next” and Firefox Prefetching

Mar 13th, 2010 - Elliott Brueggeman
A few months ago while debugging a Wordpress site and outputting queries into a log, I noticed that queries were getting fired for pages that I wasn’t even looking at.