November 2009
2 posts
Testing ye olde "querystring cache busting" trick.
When setting your site’s file cache settings, there are 2 common ways to properly save bandwidth with HTTP headers.
First method: compare the browser cache’s current versions
Set an http header such as ETag or Last-Modified that allows a client (browser) to compare its cached version of a file with the one on the server. With ETag, for example, the client checks the ETag of its...
4 tags
Logfile art? Yeah I did.
Here’s a script that takes a filename, parses the file for IP addresses, maps each IP to an RGBA pixel, and creates a PNG (thanks seattle.rb!).
For example, the following would map 192.168.1.1 in reverse (i.e. 1.1.168.192)…
ruby ip_colorsquare.rb production.log 4,3,2,1
Here’s one example I created with a 24-hour chunk of logs from WhereWeDoWhatWeDo (disclaimer: I mixed up the...