I built this in 2002, entirely from scratch. Until 2016, it enabled a retired bicycle shop owner with little computer expertise to run a pretty active online store featuring vintage bicycle gear.
The code was also adapted for a few other clients through the years, although that work has been lost.
Over the years, the code was ported from BSD Unix to Linux, and from PHP3 to PHP5. It is now overdue for another facelift, from function-based PHP5 to object-based PHP7, and to responsive display code.
Meanwhile, the site’s homepage and product pages have the distinction of earning a perfect 100 on Google’s PageSpeed ranking. The category pages rate 99!!
This feat is a little astonishing when you consider what this site is NOT doing:
- No page or code caching of any kind
- 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 once or twice 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.
The site is fast because it had to be: afterall, it was originally built and hosted on a $10/month BSD virtual private server account with something like a 400MHz CPU and 64MB of RAM.