Pivot Web Development

Loading breadcrumbs...

Brewing a Faster Website

A hero image of some code to help describe the blog: Brewing a Faster Website

The Anatomy of a Speed Upgrade

Welcome back to my cozy corner of the internet café! Grab a seat, order your favorite roast, and let’s dig into how I’ve supercharged my website. I promise this blend will be smooth, flavorful, and worth every sip.


Building a Leaner Frontend

To give my site a boost, I decided to combine DaisyUI, TailwindCSS, and PostCSS for my Svelte app’s frontend. DaisyUI provided a handy library of pre-styled UI components (which saved me a ton of time), while TailwindCSS kept my design approach modular and efficient. PostCSS took care of processing and optimizing my CSS, making it as small and straightforward as possible. These three solutions worked in harmony to reduce bundle size and load times, ensuring visitors can interact with my site without unnecessary delays.


Image Optimization Deep Dive

Images can be a huge bottleneck, especially for performance metrics like Largest Contentful Paint (LCP). Initially, I tried using pillow to optimize images, hosting them myself. Despite my best efforts, my LCP hovered around 4.5 seconds—a real eye-opener. To solve this, I did some research tailored to users in Latin America, since download speeds can vary quite a bit across regions.

The answer came in two parts:

  1. Hosting: I confirmed that Digital Ocean, which is my preferred hosting provider, had good response time for what I needed. It checks out.
  2. Cloudinary: By offloading image (and video) optimization to Cloudinary, I gained powerful on-the-fly transformation and compression features, making images load dramatically faster.
  3. Multiple Testing Suites: I found that Lighthouse (Google's speed test) only runs tests from New York, and I'm quite a bit aways from that! So, I did some digging and found two other testers that will allow me to move my "location" and imitate users in other countries. GTMetrix, and debugbear were a huge help.
    This three-pronged approach helped me whittle down my LCP to a more comfortable range and provide a smoother user experience, regardless of location. Now, my entire site loads in less than 1.4 seconds! Groovy.

Extra Layers of Performance and Security

Aside from the main event of optimizing images and CSS, I also implemented gzip compression to shrink file sizes before sending them over the wire. This helps cut down on page load times for all users, regardless of their connection speed. Then there’s the matter of encryption: I hardened my SSL ciphers and enabled HTTP/2 to ensure fast, secure communication between the server and browser. These choices help users feel safe on my site and also give me a modern, reliable infrastructure that can scale.


Wrapping Up

And there you have it—my latest batch of improvements, freshly brewed for a speedy, secure experience. From tackling image optimization to harnessing the power of TailwindCSS, DaisyUI, and PostCSS, I’m always on the lookout for ways to perfect the recipe. After all, what good is a barista that doesn't test their own coffee?!

Thanks for stopping by my digital coffee bar. Until next time, may your pages load quickly, your connections stay secure, and your coffee stay strong!