Here’s a blast from the past!
I built this site in 2002, entirely from scratch, using MySQL, PHP, HTML, CSS, and a smidge of C. Until 2016, the site enabled a retired bicycle shop owner with little computer expertise to run an online store featuring vintage bicycle gear.
The shop closed when the owner passed away. I have left it up as a tribute, after disabling the “Buy” buttons.
It still gets a lot of traffic, in part because of the moon calendar, which provides moon-rise and -set information aimed at helping people plan moonlight mountain bike rides, a passion of the site’s former owner. The moon calendar calls custom-compiled C binaries based on phoon and gcal.
Over the years, the code was ported from BSD Unix to Linux, and from PHP3 to PHP5. It is due for another facelift, from function-based PHP5 to object-based PHP7, and to responsive display code, if anyone is interested!
DerbyKing.com’s homepage and product pages have the distinction of earning a perfect 100 on Google’s PageSpeed ranking, while the category pages rate 99 or higher!!
This feat is more astonishing when you consider what this site is NOT doing:
- No page or code caching
- No minified code
- No page compression
- PHP5, without speed enhancements of PHP7
- No high-end hosting… it’s just DigitalOcean
What’s the secret?
- Carefully optimized SQL queries that hit the database only a time or two per page load
- One .css file per page
- Loading .js files only on pages where needed.
- Dead-simple DOM. Only ~300 nodes!
The administrator backend is pretty fast, too.
As noted, if any readers have time and interest in hacking on this, let me know, and I’ll set it up a github and release it GPL2.