Thursday, September 25, 2008

Comments, Links

A kind person wrote me an e-mail asking me to make an improvement on a little known but often stumbled-upon section of my web server, the Shanghai Bus Routes in English project. The project's big failing is that it has always lacked a way to search the routes for a specific stop.

The letter-writer's idea was simple and elegant: generate one giant web page with all of the bus routes on it and let the web browser do the searching. So I got to work and 10 minutes (cat and a few of emacs' query-replaces) later I have a working product. Be careful, though, it is almost one megabyte in size so if you intend to use it often it is better to download a copy to your own computer.

7 Comments:

At Sep 25, 2008, 10:31:00 PM, Blogger Shaun said:

With such a large page (all of it text) you would be better off creating a gzipped version. You can use something like php (http://us.php.net/ob_gzhandler) to compress the page on the fly. It will make the actual file smaller and the browser will uncompress it on the fly.

 
At Sep 26, 2008, 7:23:00 PM, Blogger Micah Sittig said:

Wouldn't that just be a matter of telling the web server to gzip requests from browsers that can handle it? Seems like a couple lines in the .htaccess file should enable it... I'll look it up.

 
At Sep 27, 2008, 8:09:00 PM, Blogger Shaun said:

Yes, the web server should have no trouble doing it. I was assuming that you didn't have any control over your server.

 
At Sep 30, 2008, 4:10:00 PM, Blogger Jeff Rutsch said:

Thanks mister, that is really cool.

 
At Oct 3, 2008, 2:21:00 PM, Anonymous Anonymous said:

Thank you -- brilliant. Liz

 
At Oct 3, 2008, 2:29:00 PM, Anonymous Anonymous said:

P.S. Stop number 11 on route 925 is S Shanxie Road, not Huashan Road twice!

I know because I catch that bus home every night and I get off at Shanxie Lu

 
At Oct 3, 2008, 11:48:00 PM, Blogger Micah Sittig said:

Thanks Liz! I will update it by hand. I hope the official Shanghai Transportation Authority site can fix it by the next update.

 

Post a Comment

Post a Comment

« Home