This site loads so quickly. What is your secret?

Node Link

First of all, note that I do not consider myself an expert on load time optimisations, and you may be able to find better advice elsewhere using web searches.

That put aside, here are some factors that may contribute to this:

  1. Some of it has to do with my web hosting, currently HostGator. While not perfect, I am quite happy with them, and can recommend them for shared hosting.

  2. It is possible the site does not receive a lot of traffic for a variety of reasons. (I'm not sure.)

  3. The website is mostly static and served from the server's hard disk directly without potentially costly server-side scripting.

  4. I avoid loading unnecessary JavaScript codes and other resources from other sites (with some possible exceptions.).

  5. I enabled server-side gzip/deflate/etc. compression.

  6. XHTML/HTML, CSS, and JavaScript are all being minified. See HTML minifier for HTML, Go minifiers for SVG, and UglifyJS for JavaScript.

  7. I use common external stylesheets, script files, and images, instead of embedding them on every page.

  8. PNG images are compressed using OptiPNG ; SVG images are used as well.

    Moreover, I recently started to increasingly make use of the WebP format, whose files tend to be smaller than PNG and JPEG ones, and look better and crispier than JPEG.

  9. I sometimes remove various embellishments of the site, that, while seemed a good idea, or even were one in the past, are no longer needed.

  10. The navigation menu is partly populated after the page load by using an XMLHttpRequest (or so-called "AJAX") call to a static JSON file.

  11. I sometimes reduce the size of the HTML markup by using wrapper tags and child or descendent CSS combinators. Moreover, adding CSS classes or id="…" attributes to existing tags can help even more.

  12. I use webpack to remaster jQuery-UI’s distribution, and reduce its size.

Are all these techniques useful on each-and-every WWW request? Probably not. Someone told me many pages of my site do not have too many images, whether .webp or otherwise. ( Reference . ) But I still prefer to leave no stone unturned and not rest-on-my-laurels. ( Reference: “Factor Optimisations” )


Some constraints may play against the site's responsiveness. For example:

  1. Use of XHTML instead of HTML.

  2. Use of valid markup.

  3. Use of jQuery and jQuery-UI. I see them as desirable Evils out of convenience.

  4. My policy for my sites to be as usable as possible with JavaScript/etc. unavailable.

Also see:

  1. Tweet about the average web page size.

  2. Wired feature about the average web page size: The Average Webpage Is Now the Size of the Original Doom | WIRED.

  3. Reflections on software quality.