magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1999 > 07 > Programming with Perl

Pushing Back on Y2K

Almost every day, I hear another story in the popular or industry press about Y2K: Meeting Y2K compliance for air traffic control. Y2K concerns about the power grid. And of course, a frequently asked question about Perl is "does the <fill in the blank> Perl module handle Y2K properly?" Well, ultimately, who knows? But meanwhile, I've got some code to hack out.

One of the things that seem to be popping up everywhere is the cute, little Y2K countdown clock. For the most part, they seem to be Java or JavaScript toys, all completely useless after the turn of the century. So, it occurred to me that I could write one of these gadgets without resorting to the overkill of using a low-level language like Java or JavaScript. At the same time, I could show off how to create a dynamically changing image using "server push" technology -- something most modern browsers understand just fine -- without enabling security-risky and destabilizing add-on techniques.

Now, most of the things that server push had been used for have been subsumed by the proper creation of "animated GIFs," but animated GIFs work only when all the images can be predetermined before the download. In the case of the Y2K clock, we need to compute each image individually, because the clock never displays the same numbers twice.

In order to use a server-push script, we have to adhere to a few restrictions. One is that we'll need to generate a repeated set of HTTP headers and bodies, all within a structure that gives the overall content-type of multipart/x-replace-mixed.




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2