<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Abhinav Shinoy</title>
    <description>The latest articles on Forem by Abhinav Shinoy (@abhinavshinoy90).</description>
    <link>https://forem.com/abhinavshinoy90</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2915220%2F05e0d857-4dd9-4b6f-b92e-cbd2f3aa511e.png</url>
      <title>Forem: Abhinav Shinoy</title>
      <link>https://forem.com/abhinavshinoy90</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abhinavshinoy90"/>
    <language>en</language>
    <item>
      <title>GC Isn’t Slow — Your frontend Is Just Hoarding Memory</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Fri, 02 Jan 2026 00:52:28 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/gc-isnt-slow-your-frontend-is-just-hoarding-memory-27al</link>
      <guid>https://forem.com/abhinavshinoy90/gc-isnt-slow-your-frontend-is-just-hoarding-memory-27al</guid>
      <description>&lt;p&gt;Garbage Collection (GC) is one of those topics frontend engineers &lt;em&gt;know exists&lt;/em&gt; but rarely think about—until something stutters, freezes, or mysteriously slows down.&lt;/p&gt;

&lt;p&gt;When performance issues arise, GC often becomes the default suspect:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“The garbage collector is probably running.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes that’s true. Often, it’s not.&lt;/p&gt;

&lt;p&gt;In this post, we’ll break down &lt;strong&gt;common garbage collection myths in frontend applications&lt;/strong&gt;, what browsers actually do, and where your performance problems are more likely coming from.&lt;/p&gt;




&lt;h2&gt;
  
  
  Myth 1: “Garbage Collection Is Random”
&lt;/h2&gt;

&lt;p&gt;GC is &lt;strong&gt;not random&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Modern JavaScript engines (V8, SpiderMonkey, JavaScriptCore) run &lt;strong&gt;deterministic, heuristic-driven collectors&lt;/strong&gt;. They decide &lt;em&gt;when&lt;/em&gt; to collect based on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Allocation rate&lt;/li&gt;
&lt;li&gt;Heap size&lt;/li&gt;
&lt;li&gt;Memory pressure&lt;/li&gt;
&lt;li&gt;Past GC behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GC runs because &lt;strong&gt;you allocated memory&lt;/strong&gt;, not because the browser woke up in a bad mood.&lt;/p&gt;

&lt;p&gt;If you see frequent GC pauses, it usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You’re allocating too much&lt;/li&gt;
&lt;li&gt;You’re allocating too fast&lt;/li&gt;
&lt;li&gt;You’re holding onto memory longer than expected&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Myth 2: “Garbage Collection Only Happens When Memory Is Full”
&lt;/h2&gt;

&lt;p&gt;This is one of the most persistent misunderstandings.&lt;/p&gt;

&lt;p&gt;Garbage collection often runs &lt;strong&gt;before&lt;/strong&gt; memory is exhausted.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because letting the heap grow indefinitely causes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Worse cache locality&lt;/li&gt;
&lt;li&gt;Longer GC pauses later&lt;/li&gt;
&lt;li&gt;Increased memory pressure across tabs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Modern engines prefer &lt;strong&gt;frequent, incremental collections&lt;/strong&gt; over rare catastrophic ones.&lt;/p&gt;

&lt;p&gt;In practice, this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Small GC pauses happen even when plenty of memory is available&lt;/li&gt;
&lt;li&gt;Waiting until memory is “full” would be far worse&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Myth 3: “GC Pauses Are Always Long and Noticeable”
&lt;/h2&gt;

&lt;p&gt;This used to be true.&lt;/p&gt;

&lt;p&gt;It isn’t anymore.&lt;/p&gt;

&lt;p&gt;Modern browsers use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generational GC&lt;/strong&gt; (young vs old objects)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Incremental GC&lt;/strong&gt; (work spread over time)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrent GC&lt;/strong&gt; (running off the main thread where possible)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most garbage collections today are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Short&lt;/li&gt;
&lt;li&gt;Incremental&lt;/li&gt;
&lt;li&gt;Invisible to users&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If users &lt;em&gt;notice&lt;/em&gt; GC, it usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You promoted too many objects to the old generation&lt;/li&gt;
&lt;li&gt;You created memory pressure during a critical UI phase&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Myth 4: “Creating Objects Is Expensive Because of GC”
&lt;/h2&gt;

&lt;p&gt;Object creation is usually &lt;strong&gt;cheap&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Holding onto objects is expensive.&lt;/p&gt;

&lt;p&gt;The real GC cost comes from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Long-lived objects&lt;/li&gt;
&lt;li&gt;Retained closures&lt;/li&gt;
&lt;li&gt;Detached DOM nodes&lt;/li&gt;
&lt;li&gt;Global caches that never shrink&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A fast allocation followed by fast reclamation is ideal.&lt;/p&gt;

&lt;p&gt;Problems arise when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Temporary objects accidentally become long-lived&lt;/li&gt;
&lt;li&gt;References are kept in unexpected places&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GC doesn’t punish allocation—it punishes &lt;em&gt;retention&lt;/em&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Myth 5: “Manually Clearing Variables Helps GC”
&lt;/h2&gt;

&lt;p&gt;Setting variables to &lt;code&gt;null&lt;/code&gt; rarely helps.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;JavaScript engines track &lt;strong&gt;reachability&lt;/strong&gt;, not variable names.&lt;/p&gt;

&lt;p&gt;If an object is unreachable, it will be collected—whether you manually cleared it or not.&lt;/p&gt;

&lt;p&gt;Manual clearing only helps when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are breaking a reference chain&lt;/li&gt;
&lt;li&gt;You are releasing large structures earlier than scope exit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Blindly nulling variables often:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Adds noise&lt;/li&gt;
&lt;li&gt;Reduces readability&lt;/li&gt;
&lt;li&gt;Provides no measurable benefit&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Myth 6: “Memory Leaks Are Always Obvious”
&lt;/h2&gt;

&lt;p&gt;Most frontend memory leaks are subtle.&lt;/p&gt;

&lt;p&gt;Common real-world leaks include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Event listeners never removed&lt;/li&gt;
&lt;li&gt;Closures capturing large objects&lt;/li&gt;
&lt;li&gt;DOM nodes removed visually but still referenced&lt;/li&gt;
&lt;li&gt;Caches keyed incorrectly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These don’t explode memory immediately.&lt;br&gt;
They slowly increase heap usage until GC can no longer cope gracefully.&lt;/p&gt;

&lt;p&gt;By the time GC becomes visible, the leak has usually existed for a long time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Myth 7: “Frameworks Handle GC for You”
&lt;/h2&gt;

&lt;p&gt;Frameworks help—but they don’t make GC disappear.&lt;/p&gt;

&lt;p&gt;They can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce accidental leaks&lt;/li&gt;
&lt;li&gt;Encourage predictable lifecycles&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They cannot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prevent logical retention bugs&lt;/li&gt;
&lt;li&gt;Fix misuse of closures&lt;/li&gt;
&lt;li&gt;Automatically clean up custom event systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you write JavaScript, you are responsible for memory behavior—framework or not.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where GC Actually Hurts Frontend Apps
&lt;/h2&gt;

&lt;p&gt;GC problems tend to surface during:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Initial page load&lt;/li&gt;
&lt;li&gt;Large re-renders&lt;/li&gt;
&lt;li&gt;Animation-heavy interactions&lt;/li&gt;
&lt;li&gt;Rapid state updates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The issue is rarely “GC itself.”&lt;/p&gt;

&lt;p&gt;It’s usually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Too much allocation in tight loops&lt;/li&gt;
&lt;li&gt;Layout + allocation happening together&lt;/li&gt;
&lt;li&gt;Memory churn during critical rendering phases&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How to Think About GC as a Frontend Engineer
&lt;/h2&gt;

&lt;p&gt;Instead of fearing GC, adopt better mental models:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Allocate freely, retain carefully&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Avoid unnecessary long-lived references&lt;/li&gt;
&lt;li&gt;Clean up subscriptions and listeners&lt;/li&gt;
&lt;li&gt;Measure memory, not just performance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;GC is not your enemy.&lt;br&gt;
Unintended memory retention is.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;When frontend performance degrades, blaming garbage collection is easy.&lt;br&gt;
Understanding it is harder—but far more useful.&lt;/p&gt;

&lt;p&gt;Most performance wins don’t come from “avoiding GC.”&lt;br&gt;
They come from &lt;strong&gt;aligning your code with how browsers already manage memory efficiently&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And once you do that, GC fades back into the background—where it belongs.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>frontend</category>
      <category>javascript</category>
      <category>garbage</category>
    </item>
    <item>
      <title>💔 The Critical Rendering Path: A Love Story (But Mostly a Horror Story)</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Sun, 07 Dec 2025 19:45:51 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/the-critical-rendering-path-a-love-story-but-mostly-a-horror-story-55b2</link>
      <guid>https://forem.com/abhinavshinoy90/the-critical-rendering-path-a-love-story-but-mostly-a-horror-story-55b2</guid>
      <description>&lt;p&gt;If the browser were a character in a movie, the &lt;strong&gt;Critical Rendering Path (CRP)&lt;/strong&gt; would be its daily workout montage—except instead of triumphantly running up stairs like Rocky, it’s tripping over JavaScript, crying over CSS, and having a small existential crisis every time you add another &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;p&gt;Let’s take a dramatic (and slightly ridiculous) journey through each step of the CRP… as if it were a cast of characters in a chaotic romantic drama.&lt;/p&gt;

&lt;p&gt;Grab your popcorn. The browser did &lt;em&gt;not&lt;/em&gt; sign up for this.&lt;/p&gt;




&lt;h1&gt;
  
  
  👶 &lt;strong&gt;1. HTML: The Overworked Intern Who Shows Up First&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Meet HTML.&lt;br&gt;
HTML arrives early, senses chaos, and starts building the &lt;strong&gt;DOM&lt;/strong&gt; one tag at a time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;? Fine.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;? Sure.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;&amp;lt;marquee&amp;gt;&lt;/code&gt;? Really???&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;HTML has no complaints… until JavaScript barges in and changes everything mid-construction.&lt;/p&gt;


&lt;h1&gt;
  
  
  🎨 &lt;strong&gt;2. CSS: The Perfectionist Designer Who Needs Everything Just Right&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;CSS strolls in late like it owns the place and starts creating the &lt;strong&gt;CSSOM&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;CSS reads your selectors and silently judges you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.homepage&lt;/span&gt; &lt;span class="nt"&gt;main&lt;/span&gt; &lt;span class="nf"&gt;#content&lt;/span&gt; &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="nd"&gt;:last-child&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="nd"&gt;:hover:not&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;.active&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;salmon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“You could’ve just written &lt;code&gt;.link:hover&lt;/code&gt;… but okay.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The browser won’t render &lt;em&gt;anything&lt;/em&gt; until CSS finishes its full skincare routine.&lt;br&gt;
Not even a single pixel.&lt;/p&gt;




&lt;h1&gt;
  
  
  🧬 &lt;strong&gt;3. Render Tree: The Couple’s Therapist&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Render Tree steps in to merge DOM + CSSOM and figure out who actually matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;display: none&lt;/code&gt; → kicked out&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;visibility: hidden&lt;/code&gt; → allowed but questionable&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;opacity: 0&lt;/code&gt; → allowed but weird&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A surprisingly messy therapy session.&lt;/p&gt;




&lt;h1&gt;
  
  
  📏 &lt;strong&gt;4. Layout: The Stressed Parent&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Layout is the one solving geometry problems nobody asked for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How wide is that flex item?&lt;/li&gt;
&lt;li&gt;How tall is this grid row?&lt;/li&gt;
&lt;li&gt;Are we reflowing &lt;em&gt;again&lt;/em&gt; because you mutated the DOM inside a scroll listener?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Layout is the parent holding everything together with duct tape.&lt;/p&gt;




&lt;h1&gt;
  
  
  🎨 &lt;strong&gt;5. Paint: The Artist Who’s Had Enough&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Finally, the browser gets to paint the pixels.&lt;br&gt;
Paint is the artsy one, but extremely sensitive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loves &lt;code&gt;opacity&lt;/code&gt; and &lt;code&gt;transform&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Hates repainting on every scroll&lt;/li&gt;
&lt;li&gt;Completely breaks down when you animate &lt;code&gt;top: 200px&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Paint is doing its best with what you give it.&lt;/p&gt;




&lt;h1&gt;
  
  
  😱 &lt;strong&gt;Where the Horror Begins&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The CRP is peaceful…&lt;br&gt;
until you add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gigantic CSS&lt;/li&gt;
&lt;li&gt;Render-blocking JS&lt;/li&gt;
&lt;li&gt;Blocking fonts&lt;/li&gt;
&lt;li&gt;Massive images&lt;/li&gt;
&lt;li&gt;Layout thrashing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then the whole love story becomes a psychological thriller.&lt;/p&gt;




&lt;h1&gt;
  
  
  🩹 &lt;strong&gt;But Wait—We Have Tools to Fix This Relationship&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Good news:&lt;br&gt;
You don’t have to raw-dog performance debugging.&lt;br&gt;
There are tools—amazing ones—that help you visualize, diagnose, and improve the Critical Rendering Path.&lt;/p&gt;

&lt;p&gt;Here are the biggest heroes of this love story:&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ &lt;strong&gt;1. Load Time (Chrome Extension)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;A friendly &lt;a href="https://chromewebstore.google.com/detail/load-time/jboepgdkcgchplagkfmgdhefadfahgda" rel="noopener noreferrer"&gt;little extension&lt;/a&gt; that shows load timings instantly right in your toolbar.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;See navigation timing events in one click&lt;/li&gt;
&lt;li&gt;Visual timeline of key milestones&lt;/li&gt;
&lt;li&gt;Capture critical milestones like TTFB, FCP, DOM Interactive, DCL, and PLT for a quick performance overview.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the CRP is a relationship you’ve neglected, &lt;a href="https://chromewebstore.google.com/detail/load-time/jboepgdkcgchplagkfmgdhefadfahgda" rel="noopener noreferrer"&gt;&lt;strong&gt;Load Time&lt;/strong&gt;&lt;/a&gt; is the couple’s counselor reminding you what’s going wrong—and when.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ &lt;strong&gt;2. Chrome DevTools – Performance Tab&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;The crime scene investigator.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It shows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The entire Critical Rendering Path&lt;/li&gt;
&lt;li&gt;DOMContentLoaded + Load&lt;/li&gt;
&lt;li&gt;Layout shifts&lt;/li&gt;
&lt;li&gt;Recalculations of style&lt;/li&gt;
&lt;li&gt;Paint and composite events&lt;/li&gt;
&lt;li&gt;Long tasks&lt;/li&gt;
&lt;li&gt;JavaScript blocking the main thread&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your site janks, pauses, or lags, Performance Tab will absolutely snitch on you.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ &lt;strong&gt;3. Lighthouse&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;The brutally honest friend.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.chrome.com/docs/lighthouse/overview" rel="noopener noreferrer"&gt;Lighthouse&lt;/a&gt; will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Judge your page&lt;/li&gt;
&lt;li&gt;Give you a score that hurts your feelings&lt;/li&gt;
&lt;li&gt;Suggest how to fix render-blocking resources&lt;/li&gt;
&lt;li&gt;Highlight layout shifts&lt;/li&gt;
&lt;li&gt;Shout “ENABLE TEXT COMPRESSION” like it’s your mom cleaning your room&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Great for quick CRP insights.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ &lt;strong&gt;4. WebPageTest&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;The scientist with 14 monitors and 500 graphs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.webpagetest.org/" rel="noopener noreferrer"&gt;WebPageTest&lt;/a&gt; gives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Filmstrips of your page loading&lt;/li&gt;
&lt;li&gt;Rendering waterfalls&lt;/li&gt;
&lt;li&gt;First Paint, Speed Index, Largest Contentful Paint&lt;/li&gt;
&lt;li&gt;What exactly blocked rendering and when&lt;/li&gt;
&lt;li&gt;CPU + network breakdowns&lt;/li&gt;
&lt;li&gt;Mobile throttling tests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want a &lt;em&gt;slow-motion replay&lt;/em&gt; of your CRP collapsing, this is your tool.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ &lt;strong&gt;5. PageSpeed Insights&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Lighthouse’s cousin who reports to Google Search.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pagespeed.web.dev/" rel="noopener noreferrer"&gt;PageSpeed Insights&lt;/a&gt; is Great for understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-world Web Vitals&lt;/li&gt;
&lt;li&gt;Field vs lab data&lt;/li&gt;
&lt;li&gt;Critical Rendering Path issues affecting SEO&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If Google Search cares, you should too.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠️ &lt;strong&gt;6. Performance APIs (for the nerds)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you want to get deep into CRP metrics in code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PerformanceObserver&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Navigation Timing API&lt;/li&gt;
&lt;li&gt;Paint Timing API&lt;/li&gt;
&lt;li&gt;Long Tasks API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These help you track rendering phases and bottlenecks programmatically.&lt;/p&gt;




&lt;h1&gt;
  
  
  ❤️ &lt;strong&gt;How to Make This Love Story Less Toxic&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;Just a few habits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Preload critical CSS, fonts, and hero images&lt;/li&gt;
&lt;li&gt;Async/defer non-critical JS&lt;/li&gt;
&lt;li&gt;Compress images&lt;/li&gt;
&lt;li&gt;Avoid layout thrashing&lt;/li&gt;
&lt;li&gt;Animate only &lt;code&gt;transform&lt;/code&gt; + &lt;code&gt;opacity&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Keep your DOM simple&lt;/li&gt;
&lt;li&gt;Use tools to verify your assumptions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The CRP isn’t scary—it just wants a little respect.&lt;/p&gt;




&lt;h1&gt;
  
  
  🎬 &lt;strong&gt;Final Scene&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The Critical Rendering Path is fragile, dramatic, and incredibly important.&lt;br&gt;
The browser is doing SO MUCH work behind the scenes, and every time you ship a 3MB blocking script, a browser somewhere cries.&lt;/p&gt;

&lt;p&gt;But with the right tools—Load Time, DevTools, WebPageTest, Lighthouse—you can turn this horror story back into a rom-com.&lt;/p&gt;

&lt;p&gt;Happy rendering!&lt;br&gt;
🚀💙&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>performance</category>
      <category>webperf</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why Your Website Is Slow (and Why It’s Probably Your Fault)</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Sun, 07 Dec 2025 19:32:20 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/why-your-website-is-slow-and-why-its-probably-your-fault-2k6</link>
      <guid>https://forem.com/abhinavshinoy90/why-your-website-is-slow-and-why-its-probably-your-fault-2k6</guid>
      <description>&lt;p&gt;&lt;em&gt;…a mildly chaotic guide to web performance&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let’s be honest: if websites had feelings, half the pages on the internet would be filing HR complaints for “unnecessary stress.” We throw megabytes of JavaScript at the browser like it’s a CrossFit athlete and then cry when it wheezes.&lt;/p&gt;

&lt;p&gt;Today, let’s take a humorous stroll through the world of &lt;strong&gt;web performance&lt;/strong&gt;—that magical land where milliseconds matter, requests multiply like rabbits, and someone somewhere always says "it was fast on my machine."&lt;/p&gt;




&lt;h2&gt;
  
  
  🧱 1. The DOM Is Not Your Personal Storage Unit
&lt;/h2&gt;

&lt;p&gt;Developers: &lt;em&gt;“Let’s just add one more wrapper div.”&lt;/em&gt;&lt;br&gt;
Browser: &lt;em&gt;“…please stop.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every time you nest elements like you’re constructing a Matryoshka doll, the browser has to parse, build, compute, layout, and paint &lt;em&gt;all of it&lt;/em&gt;. It's like giving it IKEA instructions written in crayon.&lt;/p&gt;

&lt;p&gt;Try asking yourself occasionally:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Does this div spark joy?”&lt;br&gt;
If not, KonMari it.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  🧮 2. JavaScript: The Silent Website Killer
&lt;/h2&gt;

&lt;p&gt;Nothing slows a site like a giant JavaScript bundle smacking the browser right in the face.&lt;/p&gt;

&lt;p&gt;You know that feeling when someone hands you a 600-page report and says “just skim it”?&lt;br&gt;
That’s what you’re doing to the browser when your bundle is 3MB.&lt;/p&gt;

&lt;p&gt;And yes, the bundler warnings are real.&lt;br&gt;
And yes, you did ignore them.&lt;/p&gt;


&lt;h2&gt;
  
  
  🎨 3. CSS Selectors That Could End a Marriage
&lt;/h2&gt;

&lt;p&gt;We’ve all met That Developer™ who writes CSS like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.homepage&lt;/span&gt; &lt;span class="nt"&gt;main&lt;/span&gt; &lt;span class="nf"&gt;#content&lt;/span&gt; &lt;span class="nc"&gt;.wrapper&lt;/span&gt; &lt;span class="nc"&gt;.container&lt;/span&gt; &lt;span class="nt"&gt;ul&lt;/span&gt; &lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="nd"&gt;:last-child&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;hotpink&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This selector is on a spiritual journey, but the browser is not.&lt;br&gt;
It has to evaluate every part of it—&lt;em&gt;every time&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Please.&lt;br&gt;
For the sake of browser sanity: simplify.&lt;/p&gt;




&lt;h2&gt;
  
  
  🖼️ 4. Images: The True Villains of the Web
&lt;/h2&gt;

&lt;p&gt;PNG: “I’m 8MB.”&lt;br&gt;
Developer: “Looks fine.”&lt;br&gt;
User on 3G: &lt;strong&gt;cries in throttling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Please use modern formats like WebP or AVIF. The browser will thank you. The user will thank you. Your Lighthouse score will rise from the dead.&lt;/p&gt;

&lt;p&gt;Bonus tip:&lt;br&gt;
If your logo is bigger than your JavaScript bundle, it’s not a logo anymore. It’s a threat.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔁 5. Third-Party Scripts: The Self-Invited Party Guests
&lt;/h2&gt;

&lt;p&gt;Analytics, ads, chat widgets, personalization scripts, tag managers…&lt;br&gt;
You add one, then another, then five more because “marketing said so.”&lt;/p&gt;

&lt;p&gt;Before long, your site looks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;12 trackers&lt;/li&gt;
&lt;li&gt;6 pixels&lt;/li&gt;
&lt;li&gt;4 chatbots&lt;/li&gt;
&lt;li&gt;3 mystery scripts no one wants to delete "just in case"&lt;/li&gt;
&lt;li&gt;and a partridge in a pear tree&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pro tip:&lt;br&gt;
Whenever you add a new third-party script, remove two old ones and maybe apologize to your users.&lt;/p&gt;




&lt;h2&gt;
  
  
  💤 6. Render-Blocking Resources: The Browser’s Worst Nightmare
&lt;/h2&gt;

&lt;p&gt;CSS living in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; without &lt;code&gt;media&lt;/code&gt; attributes?&lt;br&gt;
Synchronous scripts?&lt;br&gt;
Fonts loading with no fallback?&lt;/p&gt;

&lt;p&gt;Congratulations, you’ve built &lt;em&gt;the Internet’s slowest progress bar.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Browsers have to stop everything until these items are downloaded and parsed. Imagine pausing a movie every 10 seconds to fetch snacks. That’s your site.&lt;/p&gt;




&lt;h2&gt;
  
  
  🥇 7. Hero Images That Load Like They’re Doing You a Favor
&lt;/h2&gt;

&lt;p&gt;Few things are as majestic as a hero banner that appears… eventually… after three seconds… using a fade-in so slow that you're not sure whether it’s a feature or a haunting.&lt;/p&gt;

&lt;p&gt;Try preloading your hero image. Or compress it. Or maybe pick a smaller one.&lt;br&gt;
It doesn’t need to be a billboard on the highway.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 8. The Critical Rendering Path Is Not Optional Reading
&lt;/h2&gt;

&lt;p&gt;Every browser goes through a predictable journey:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Parse HTML&lt;/li&gt;
&lt;li&gt;Build DOM&lt;/li&gt;
&lt;li&gt;Build CSSOM&lt;/li&gt;
&lt;li&gt;Build render tree&lt;/li&gt;
&lt;li&gt;Layout&lt;/li&gt;
&lt;li&gt;Paint&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can help it. Or you can make its life a living nightmare. Your choice.&lt;/p&gt;

&lt;p&gt;If you block it with scripts, force reflows, or dump 200kb of unused CSS, you are choosing violence.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/load-time/jboepgdkcgchplagkfmgdhefadfahgda" rel="noopener noreferrer"&gt;This tool&lt;/a&gt; helps visualize your critical rendering path.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚡ 9. Performance: It’s Not About Scoring 100
&lt;/h2&gt;

&lt;p&gt;Sure, Lighthouse scores feel nice.&lt;br&gt;
Sure, hitting green everywhere gives you the warm dopamine glow of a thousand suns.&lt;/p&gt;

&lt;p&gt;But real performance is about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster interactions&lt;/li&gt;
&lt;li&gt;Smooth rendering&lt;/li&gt;
&lt;li&gt;Less JavaScript&lt;/li&gt;
&lt;li&gt;Fewer layout shifts&lt;/li&gt;
&lt;li&gt;Happy users&lt;/li&gt;
&lt;li&gt;And fewer late-night Slack messages asking “is the site slow for you?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your site feels fast, you win.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧘 10. Accept That You Will Never Finish Optimizing
&lt;/h2&gt;

&lt;p&gt;Web performance is like going to the gym:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You think you’re done&lt;/li&gt;
&lt;li&gt;You discover a new muscle you forgot exists&lt;/li&gt;
&lt;li&gt;Everything hurts&lt;/li&gt;
&lt;li&gt;And yet you keep coming back&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Browsers evolve. Frameworks evolve. Your code evolves.&lt;br&gt;
Performance is a journey, and the browser is your workout buddy who’s just trying not to pass out.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎉 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Performance isn’t magic.&lt;br&gt;
It’s just &lt;strong&gt;respecting the browser&lt;/strong&gt;, &lt;strong&gt;keeping payloads small&lt;/strong&gt;, and &lt;strong&gt;not treating the user’s device like a NASA supercomputer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At the end of the day, fast websites simply feel better. And your future self will thank you for not shipping a 9MB hero video encoded in 2008-era MP4.&lt;/p&gt;

&lt;p&gt;Happy optimizing!&lt;br&gt;
🚀✨&lt;/p&gt;




</description>
      <category>webdev</category>
      <category>web</category>
      <category>performance</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Vite vs Webpack: Who Wins in 2025?</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Fri, 18 Jul 2025 06:13:16 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/vite-vs-webpack-who-wins-in-2025-1cd6</link>
      <guid>https://forem.com/abhinavshinoy90/vite-vs-webpack-who-wins-in-2025-1cd6</guid>
      <description>&lt;p&gt;&lt;strong&gt;A Look at Two Titans of the Frontend Build World—And Why the Landscape Is Changing&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ⚔️ The Battle Continues: Vite vs Webpack in 2025
&lt;/h3&gt;

&lt;p&gt;The debate between Vite and Webpack has been one of the most talked-about topics in frontend engineering over the past few years. Now, in 2025, the dust has started to settle—but the choice between them still depends on your context.&lt;/p&gt;

&lt;p&gt;This post dives into where each tool stands today, how their ecosystems have evolved, and when one is clearly the better choice over the other.&lt;/p&gt;




&lt;h3&gt;
  
  
  🚀 A Quick Recap: What Are They?
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Webpack&lt;/strong&gt; is the long-time heavyweight of JavaScript bundlers. Born in the era of complex single-page apps, it offers deep configurability, a massive plugin ecosystem, and has been the default choice for many years.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vite&lt;/strong&gt; (pronounced &lt;em&gt;veet&lt;/em&gt;), on the other hand, is the modern challenger. Created by Evan You (of Vue.js fame), it leverages native ES Modules and an extremely fast development server powered by &lt;a href="https://esbuild.github.io/" rel="noopener noreferrer"&gt;esbuild&lt;/a&gt; (and more recently, &lt;a href="https://rollupjs.org" rel="noopener noreferrer"&gt;Rollup&lt;/a&gt; for production builds).&lt;/p&gt;




&lt;h3&gt;
  
  
  🧪 Dev Experience in 2025
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Vite&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Webpack&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dev server startup&lt;/td&gt;
&lt;td&gt;⚡ Instant (native ESM)&lt;/td&gt;
&lt;td&gt;🐢 Can be slow on large projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hot Module Replacement&lt;/td&gt;
&lt;td&gt;🔥 Near-instant&lt;/td&gt;
&lt;td&gt;🔥 Fast, but can lag with complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Config complexity&lt;/td&gt;
&lt;td&gt;🧩 Simple out of the box&lt;/td&gt;
&lt;td&gt;🧩 Often needs tuning and plugins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plugin ecosystem&lt;/td&gt;
&lt;td&gt;🌱 Growing fast&lt;/td&gt;
&lt;td&gt;🌲 Mature and massive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TypeScript integration&lt;/td&gt;
&lt;td&gt;✅ Seamless&lt;/td&gt;
&lt;td&gt;✅ Mature&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Vite wins on speed and simplicity. Webpack still wins on legacy support and plugin availability—but the gap is shrinking.&lt;/p&gt;




&lt;h3&gt;
  
  
  🏗️ Production Builds: Who’s Faster Now?
&lt;/h3&gt;

&lt;p&gt;Vite used to lag slightly in production build times because it used Rollup, which prioritizes output quality over raw speed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But in 2025:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vite supports &lt;strong&gt;parallelized build steps&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Plugin ecosystem now includes &lt;strong&gt;Rollup plugins with esbuild transforms&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Improvements in Rollup 4 and browser targeting strategies have closed the gap&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Webpack 5&lt;/strong&gt; is still fast with persistent caching and optimized configs, but Vite's developer-first focus gives it the edge—especially in projects that don’t need deep custom build pipelines.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧰 Ecosystem &amp;amp; Plugin Support
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Webpack&lt;/strong&gt;: Has integrations for &lt;em&gt;everything&lt;/em&gt;—legacy codebases, specific loaders, custom module systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vite&lt;/strong&gt;: Modern ecosystem that's grown rapidly. Plugins for React, Vue, Preact, Svelte, Astro, SolidJS, etc. If you're using modern frameworks, you're covered.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key plugin highlights in 2025:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vite-plugin-inspect&lt;/code&gt; for deep build analysis&lt;/li&gt;
&lt;li&gt;Vite now supports plugin chaining similar to Webpack's loader pipelines&lt;/li&gt;
&lt;li&gt;Improved DX for environment variables, polyfills, and SSR&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔮 So, Who Wins?
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;If you're building a modern frontend app in 2025&lt;/strong&gt;:
&lt;/h4&gt;

&lt;p&gt;✅ &lt;strong&gt;Vite wins hands-down&lt;/strong&gt; for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Speed&lt;/li&gt;
&lt;li&gt;Simplicity&lt;/li&gt;
&lt;li&gt;Ecosystem alignment with modern frameworks&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;If you're working on a large enterprise app with years of custom Webpack config&lt;/strong&gt;:
&lt;/h4&gt;

&lt;p&gt;✅ &lt;strong&gt;Stick with Webpack&lt;/strong&gt;, unless:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You’re planning a rewrite&lt;/li&gt;
&lt;li&gt;You want to experiment with migration strategies (some hybrid setups are now possible)&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🧭 The Bigger Trend: Build Tools Are Fading into the Background
&lt;/h3&gt;

&lt;p&gt;As tooling matures, most developers don't want to write complex build configs. They want tools that just work.&lt;/p&gt;

&lt;p&gt;That's where Vite excels. Its convention-over-configuration approach, fast dev loop, and optimized defaults are making it the go-to choice for new projects.&lt;/p&gt;

&lt;p&gt;Even major frameworks like &lt;strong&gt;Vue, Svelte, Solid, and Astro&lt;/strong&gt; now default to Vite. And with &lt;strong&gt;VitePress&lt;/strong&gt; and &lt;strong&gt;Vitest&lt;/strong&gt;, it’s quickly becoming a holistic ecosystem.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✨ Final Take
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In 2025, Vite is the default unless you have a good reason to use Webpack.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It’s not about one replacing the other entirely—it’s about using the right tool for your stack. And increasingly, that tool is Vite.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What are you using in production? Have you migrated from Webpack to Vite—or still holding out? Drop a comment below and let’s share war stories.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>vite</category>
      <category>webpack</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Inside the Critical Rendering Path: What Your Browser Is Really Doing</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Fri, 27 Jun 2025 05:48:56 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/inside-the-critical-rendering-path-what-your-browser-is-really-doing-15mp</link>
      <guid>https://forem.com/abhinavshinoy90/inside-the-critical-rendering-path-what-your-browser-is-really-doing-15mp</guid>
      <description>&lt;p&gt;When you visit a web page, a lot happens before you see anything. Bytes travel, files load, scripts run—and somewhere in that flurry of activity, pixels appear on your screen.&lt;/p&gt;

&lt;p&gt;That journey is called the &lt;strong&gt;Critical Rendering Path (CRP)&lt;/strong&gt;. It’s the behind-the-scenes choreography that turns code into content, and understanding it is key to diagnosing and improving how users experience your site.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What Is the Critical Rendering Path?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The CRP is the sequence of steps the browser follows to convert HTML, CSS, and JavaScript into pixels. These steps include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;HTML parsing → DOM construction&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CSS parsing → CSSOM construction&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DOM + CSSOM → Render Tree creation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Render Tree → Layout (calculating element positions)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Layout → Paint (rasterizing pixels on screen)&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each of these phases depends on network responses, script execution, and style resolution. If anything delays these steps, your users wait longer to see or interact with content.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Why It Matters for Performance&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You might measure total load time and think you’re in good shape. But if the browser hasn’t reached the paint step—or if key render-blocking resources are stuck downloading—then your users are staring at a blank screen.&lt;/p&gt;

&lt;p&gt;This is where real user frustration begins. And the more complex your app is, the harder it becomes to trace what’s blocking that crucial first paint.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;What Slows Down the CRP?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Several common culprits interfere with efficient rendering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Large or unoptimized CSS files&lt;/strong&gt; that block rendering&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JavaScript that modifies the DOM before first paint&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web fonts that delay text rendering (FOIT/FOUT issues)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Heavy layout shifts caused by asynchronous content&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-party scripts&lt;/strong&gt; delaying critical resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even small inefficiencies here can cascade into seconds of user-perceived delay.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Tools to Help You Trace the CRP&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Diagnosing rendering issues isn’t always obvious. DevTools can show timings, but combining multiple tools gives you better visibility into what's happening—and when.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.chrome.com/docs/devtools" rel="noopener noreferrer"&gt;&lt;strong&gt;Chrome DevTools (Performance tab)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdu23m5nkh9zo4fr4ld80.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdu23m5nkh9zo4fr4ld80.png" alt="Chrome Dev Tools" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lets you inspect frame-by-frame how rendering proceeds&lt;/li&gt;
&lt;li&gt;Highlights layout and paint events, along with scripting&lt;/li&gt;
&lt;li&gt;Ideal for deep dives, but requires a steep learning curve&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.webpagetest.org/" rel="noopener noreferrer"&gt;&lt;strong&gt;WebPageTest&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhohdjub4sctyqzoimkpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhohdjub4sctyqzoimkpr.png" alt="WebPageTest" width="600" height="404"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provides a filmstrip view and video capture of the loading process, showing what users see every 0.1 seconds.&lt;/li&gt;
&lt;li&gt;Measures Speed Index, a perceptual metric that reflects how quickly above-the-fold content becomes visible.&lt;/li&gt;
&lt;li&gt;Allows you to test on real devices and browsers under various network conditions (3G, 4G, etc.).&lt;/li&gt;
&lt;li&gt;Breaks down render-blocking resources, start render, and visually complete times.&lt;/li&gt;
&lt;li&gt;Supports advanced scripting to simulate multi-step user journeys or logins.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/Load%20Time/jboepgdkcgchplagkfmgdhefadfahgda" rel="noopener noreferrer"&gt;&lt;strong&gt;Load Time (Chrome Extension)&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/Load%20Time/jboepgdkcgchplagkfmgdhefadfahgda" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftn8qilv9gvtdjwk06p3s.png" alt="Load Time for Chrome" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Breaks down the Critical Rendering Path step-by-step—something I haven’t seen done this clearly in other tools.&lt;/li&gt;
&lt;li&gt;Offers a quick glance at whether rendering phases were delayed&lt;/li&gt;
&lt;li&gt;Useful as a lightweight complement to DevTools for spotting problematic pages as you browse.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk" rel="noopener noreferrer"&gt;&lt;strong&gt;Lighthouse&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chromewebstore.google.com/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzjrzj9mbktsl597x7ip8.png" alt="Lighthouse" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provides a performance score based on metrics like LCP (Largest Contentful Paint), TTI (Time to Interactive), CLS (Cumulative Layout Shift), and more.&lt;/li&gt;
&lt;li&gt;Offers actionable suggestions, like deferring offscreen images, reducing JavaScript execution time, and eliminating render-blocking CSS.&lt;/li&gt;
&lt;li&gt;Includes audits for accessibility, SEO, best practices, and PWA readiness—making it a holistic site health tool.&lt;/li&gt;
&lt;li&gt;Can be run locally, in CI pipelines, or through PageSpeed Insights.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Limitations: Based on synthetic testing—results may not always reflect real-world user experiences, especially on varied devices or networks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://zizzamia.github.io/perfume/" rel="noopener noreferrer"&gt;&lt;strong&gt;Perfume.js&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lightweight JavaScript library for measuring user-centric metrics (Web Vitals) in real time&lt;/li&gt;
&lt;li&gt;Useful for capturing performance data directly from users in the field&lt;/li&gt;
&lt;li&gt;Can send metrics to your analytics backend&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://speedvitals.com/" rel="noopener noreferrer"&gt;&lt;strong&gt;SpeedVitals&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://speedvitals.com/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F78dwqfkwnvff1ap98xlv.png" alt="SpeedVitals" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Detailed Core Web Vitals Breakdown – Measures and visualizes LCP, CLS, TBT, and FID with clarity, helping pinpoint UX-impacting delays.&lt;/li&gt;
&lt;li&gt;Resource Impact Analysis – Highlights which scripts, styles, or assets are hurting performance the most.&lt;/li&gt;
&lt;li&gt;Device &amp;amp; Network Emulation – Lets you test under real-world mobile and slow network conditions, mimicking real user environments.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Few tips on optimizing the Path&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want to speed up rendering, your goal is simple: &lt;strong&gt;get to first paint as early as possible.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here are a few low-hanging fruits to target on how to help the browser get there faster:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inline or defer non-critical CSS&lt;/li&gt;
&lt;li&gt;Load JavaScript asynchronously (or delay it entirely)&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;font-display: swap&lt;/code&gt; to avoid font rendering delays&lt;/li&gt;
&lt;li&gt;Preload key resources (fonts, hero images, etc.)&lt;/li&gt;
&lt;li&gt;Minimize reflows by stabilizing layout early&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even small improvements—like cutting 50ms from style resolution—can result in a page that &lt;em&gt;feels&lt;/em&gt; much faster.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;The Bottom Line&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;The Critical Rendering Path is where your site becomes real to the user. Every millisecond spent building the DOM, resolving styles, or calculating layout directly affects how fast the page appears.&lt;/p&gt;

&lt;p&gt;If you care about performance, you need to care about rendering.&lt;/p&gt;

&lt;p&gt;And while no single tool gives you the whole picture, a mix of observability—&lt;strong&gt;from DevTools to Load Time to filmstrip views&lt;/strong&gt;—can help you uncover the subtle bottlenecks between request and render.&lt;/p&gt;

&lt;p&gt;Because the faster you paint, the faster users engage.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>webperf</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>The Power of Micro Frontends — But Do You Really Need Them?</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Sat, 21 Jun 2025 06:15:19 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/the-power-of-micro-frontends-but-do-you-really-need-them-26c0</link>
      <guid>https://forem.com/abhinavshinoy90/the-power-of-micro-frontends-but-do-you-really-need-them-26c0</guid>
      <description>&lt;p&gt;Micro frontends.&lt;br&gt;
They’re the new hotness. The silver bullet. The “just split it up like microservices” of the frontend world.&lt;/p&gt;

&lt;p&gt;The concept is hard to ignore. Multiple teams, multiple frameworks, decoupled deployments — what’s not to love?&lt;/p&gt;

&lt;p&gt;But here’s the catch: &lt;strong&gt;micro frontends are powerful&lt;/strong&gt;…&lt;br&gt;
&lt;strong&gt;and potentially overkill.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s unpack what they are, what they solve, and more importantly — &lt;strong&gt;when not to use them.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧱 What &lt;em&gt;Are&lt;/em&gt; Micro Frontends?
&lt;/h2&gt;

&lt;p&gt;At a high level:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Micro frontends are an architectural pattern where a frontend is split into independent, self-contained pieces owned by different teams.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each piece:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Has its own codebase&lt;/li&gt;
&lt;li&gt;Can be built and deployed independently&lt;/li&gt;
&lt;li&gt;Can (in some cases) use its own framework or tech stack&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Kind of like frontend microservices.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔧 Why People Use Them
&lt;/h2&gt;

&lt;p&gt;Micro frontends promise to solve big problems that arise at scale:&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ 1. &lt;strong&gt;Team Autonomy&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Different teams can build, test, and deploy without stepping on each other’s toes.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ 2. &lt;strong&gt;Tech Stack Flexibility&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You could have a React team, a Vue team, and a vanilla JS team — all living in harmony (sort of).&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ 3. &lt;strong&gt;Independent Deployments&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Each frontend module can ship on its own schedule — no monolithic release trains.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ 4. &lt;strong&gt;Scalability in Large Orgs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When 5+ teams are working on one frontend, splitting it up brings sanity and structure.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 How It’s Done
&lt;/h2&gt;

&lt;p&gt;There are a few common patterns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Iframe-based embedding&lt;/strong&gt; (rare now, but still used in low-trust situations)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build-time integration&lt;/strong&gt;: teams share modules, but build into one app&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime integration&lt;/strong&gt;: via module federation (Webpack 5), single-spa, or custom loaders&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can even lazy-load separate apps into shell containers, making the user feel like it’s all one experience.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧨 The Hidden Costs
&lt;/h2&gt;

&lt;p&gt;So far, so good… but here’s what they don’t always tell you.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚠️ 1. &lt;strong&gt;Increased Complexity&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You now have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple deployments to track&lt;/li&gt;
&lt;li&gt;Shared state problems&lt;/li&gt;
&lt;li&gt;Inter-app communication headaches&lt;/li&gt;
&lt;li&gt;CI/CD pipelines everywhere&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’ve traded monolith chaos for &lt;em&gt;distributed chaos&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚠️ 2. &lt;strong&gt;Performance Overheads&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If not done carefully, users may:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download multiple versions of React&lt;/li&gt;
&lt;li&gt;Hit duplicated dependencies&lt;/li&gt;
&lt;li&gt;Experience slower startup due to fragmented loading&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without strong orchestration, UX suffers.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚠️ 3. &lt;strong&gt;Shared Styling Becomes Hard&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Global styles, tokens, and design systems become harder to maintain. CSS scoping and versioning become non-trivial.&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚠️ 4. &lt;strong&gt;Onboarding Costs&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;New devs now need to learn not just the app, but the &lt;em&gt;system of apps&lt;/em&gt; — how they connect, communicate, and deploy.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 So… Do You &lt;em&gt;Really&lt;/em&gt; Need Them?
&lt;/h2&gt;

&lt;p&gt;Ask yourself:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;th&gt;If Yes…&lt;/th&gt;
&lt;th&gt;If No…&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Do you have &lt;strong&gt;3+ frontend teams&lt;/strong&gt; working on separate domains?&lt;/td&gt;
&lt;td&gt;Micro frontends could help.&lt;/td&gt;
&lt;td&gt;You’re likely fine with modular monoliths.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Do your features need &lt;strong&gt;independent deployments&lt;/strong&gt;?&lt;/td&gt;
&lt;td&gt;Could justify the setup.&lt;/td&gt;
&lt;td&gt;Stick to a single build process.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Are teams blocked by &lt;strong&gt;cross-team coordination&lt;/strong&gt;?&lt;/td&gt;
&lt;td&gt;MFs can reduce friction.&lt;/td&gt;
&lt;td&gt;Try better code organization first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Do you have &lt;strong&gt;existing shared state&lt;/strong&gt; across features?&lt;/td&gt;
&lt;td&gt;MFs will complicate that.&lt;/td&gt;
&lt;td&gt;Avoid unless you have a solid state-sharing strategy.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Are you operating at the &lt;strong&gt;scale of Amazon, Spotify, or IKEA&lt;/strong&gt;?&lt;/td&gt;
&lt;td&gt;Go ahead.&lt;/td&gt;
&lt;td&gt;Seriously reconsider.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In most cases, the real bottleneck isn't architecture — it's communication and code discipline.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛠 What You Might Try &lt;em&gt;Instead&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;Before reaching for micro frontends, consider:&lt;/p&gt;

&lt;h3&gt;
  
  
  🧩 1. &lt;strong&gt;Modular Monoliths&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Keep a single app, but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use feature-based folder structures&lt;/li&gt;
&lt;li&gt;Use internal npm packages or libraries&lt;/li&gt;
&lt;li&gt;Define clear boundaries and owners&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🧱 2. &lt;strong&gt;Federated Modules in Moderation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Use &lt;a href="https://webpack.js.org/concepts/module-federation/" rel="noopener noreferrer"&gt;Webpack Module Federation&lt;/a&gt; to split &lt;em&gt;just&lt;/em&gt; what's needed. No need to break everything apart.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔀 3. &lt;strong&gt;Route-Based Code Splitting&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Tools like React.lazy, Vue async components, and dynamic imports can create boundaries &lt;em&gt;without&lt;/em&gt; separate deployments.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✍️ Final Thought
&lt;/h2&gt;

&lt;p&gt;Micro frontends are &lt;strong&gt;not a best practice&lt;/strong&gt; — they’re a tradeoff.&lt;/p&gt;

&lt;p&gt;They bring power, but also pain. And unless you're hitting the scaling wall hard, you might be engineering yourself into a corner you didn’t need to enter.&lt;/p&gt;

&lt;p&gt;So yes — appreciate the power.&lt;br&gt;
Build a proof of concept.&lt;br&gt;
Play with module federation or single-spa.&lt;/p&gt;

&lt;p&gt;But before you commit your team to a new world of containers, runtimes, and orchestration layers...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ask the simplest question:&lt;br&gt;
&lt;strong&gt;"Do we need this to move faster, or just to feel fancier?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Choose wisely.&lt;/p&gt;




</description>
      <category>microfrontend</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Your Bundle is Lying to You: Hidden Costs of Tree-Shaking</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Fri, 06 Jun 2025 22:01:53 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/your-bundle-is-lying-to-you-hidden-costs-of-tree-shaking-15pd</link>
      <guid>https://forem.com/abhinavshinoy90/your-bundle-is-lying-to-you-hidden-costs-of-tree-shaking-15pd</guid>
      <description>&lt;p&gt;We’ve all heard it:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“It’s fine, unused code gets tree-shaken out.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But here’s the truth…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your bundle is lying to you.&lt;/strong&gt;&lt;br&gt;
And &lt;strong&gt;tree-shaking isn't the silver bullet&lt;/strong&gt; you think it is.&lt;/p&gt;

&lt;p&gt;In this post, we’ll look at how tree-shaking &lt;em&gt;really&lt;/em&gt; works, what gets left behind, and why your production bundle might be heavier than it needs to be — even when everything &lt;em&gt;looks&lt;/em&gt; optimized.&lt;/p&gt;


&lt;h2&gt;
  
  
  🧩 What Is Tree-Shaking (Really)?
&lt;/h2&gt;

&lt;p&gt;Tree-shaking is a bundler optimization technique that &lt;strong&gt;removes unused exports&lt;/strong&gt; from ES modules during bundling.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// utils.js&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;used&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;unused&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If only &lt;code&gt;used()&lt;/code&gt; is imported elsewhere, a good bundler will drop &lt;code&gt;unused()&lt;/code&gt; from the final build.&lt;/p&gt;

&lt;p&gt;Sounds great, right? So what’s the problem?&lt;/p&gt;




&lt;h2&gt;
  
  
  🚨 Problem 1: Side Effects Are Sticky
&lt;/h2&gt;

&lt;p&gt;Many libraries contain &lt;strong&gt;side effects&lt;/strong&gt; — things that run when the file is imported, even if nothing is used.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// file.js&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;This runs no matter what&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;something&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tree-shaking won’t remove this file unless the bundler knows it's &lt;strong&gt;side-effect-free&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If the library doesn’t declare:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"sideEffects"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;…or it contains CSS imports, polyfills, or runtime setup, &lt;strong&gt;the whole file stays in&lt;/strong&gt; — even if you use nothing from it.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚨 Problem 2: Misleading Import Patterns
&lt;/h2&gt;

&lt;p&gt;Some APIs are hard to shake because of how you import them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// BAD&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;_&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This pulls in the entire lodash bundle — even if you use just one function.&lt;/p&gt;

&lt;p&gt;Instead, you should:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// GOOD&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;debounce&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash/debounce&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even better? Use modern tree-shakable alternatives like &lt;code&gt;lodash-es&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚨 Problem 3: Transpilation Can Break It
&lt;/h2&gt;

&lt;p&gt;Your code might be perfectly optimized, but your &lt;strong&gt;build toolchain might sabotage it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Babel + CommonJS modules = 💣&lt;/li&gt;
&lt;li&gt;TypeScript with incorrect module targets = 🔥&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tree-shaking only works on &lt;strong&gt;ES modules (ESM)&lt;/strong&gt;. If your transpiler converts ESM to CommonJS (&lt;code&gt;require()&lt;/code&gt;), the bundler can’t see what’s unused.&lt;/p&gt;

&lt;p&gt;🛠 Fix: Set &lt;code&gt;module&lt;/code&gt; to &lt;code&gt;"esnext"&lt;/code&gt; and let your bundler handle module format.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚨 Problem 4: You’re Still Paying for Parse and Eval
&lt;/h2&gt;

&lt;p&gt;Even if dead code is dropped from the final JS file, &lt;strong&gt;you may still load, parse, or evaluate more than you think&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large components wrapped in &lt;code&gt;React.lazy()&lt;/code&gt; might be excluded from initial render… but still downloaded eagerly.&lt;/li&gt;
&lt;li&gt;Some lazy-loaded code gets preloaded via &lt;code&gt;&amp;lt;link rel="preload"&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Vendors like analytics or error tracking may import large polyfill chunks behind the scenes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📦 The bundle size might &lt;em&gt;look&lt;/em&gt; small — but your browser knows the truth.&lt;/p&gt;




&lt;h2&gt;
  
  
  🚨 Problem 5: Third-Party Packages Lie Too
&lt;/h2&gt;

&lt;p&gt;That one dependency you installed? It might &lt;em&gt;say&lt;/em&gt; it’s tree-shakable — but dig into the source and you’ll find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mixed ESM + CommonJS output&lt;/li&gt;
&lt;li&gt;Side effects galore&lt;/li&gt;
&lt;li&gt;Index files that re-export everything&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Always test the actual output, not just what the docs claim.&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ How to Fight Back
&lt;/h2&gt;

&lt;p&gt;Here’s how to take control of your bundle:&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 1. Analyze It
&lt;/h3&gt;

&lt;p&gt;Use tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/webpack-bundle-analyzer" rel="noopener noreferrer"&gt;Webpack Bundle Analyzer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/package/source-map-explorer" rel="noopener noreferrer"&gt;Source Map Explorer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/btd/rollup-plugin-visualizer" rel="noopener noreferrer"&gt;Vite Visualizer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;…and see what’s &lt;em&gt;really&lt;/em&gt; in your output.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✂️ 2. Use ESM-Only Libraries
&lt;/h3&gt;

&lt;p&gt;Prefer packages that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Offer native ES module builds&lt;/li&gt;
&lt;li&gt;Mark &lt;code&gt;"sideEffects": false&lt;/code&gt; in their &lt;code&gt;package.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bonus points for tree-shakable named exports.&lt;/p&gt;




&lt;h3&gt;
  
  
  📦 3. Import Precisely
&lt;/h3&gt;

&lt;p&gt;Avoid star imports or named imports from index barrels.&lt;/p&gt;

&lt;p&gt;✅ &lt;code&gt;import { format } from 'date-fns'&lt;/code&gt;&lt;br&gt;
🚫 &lt;code&gt;import * as dateFns from 'date-fns'&lt;/code&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🧪 4. Test with Production Builds
&lt;/h3&gt;

&lt;p&gt;Dev builds lie even more than your bundles.&lt;br&gt;
Always test with minified, production-mode builds.&lt;/p&gt;

&lt;p&gt;You’ll often be surprised.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Tree-shaking is a great tool — but it’s not magic.&lt;/p&gt;

&lt;p&gt;It doesn’t protect you from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bad imports&lt;/li&gt;
&lt;li&gt;Lazy-but-eager modules&lt;/li&gt;
&lt;li&gt;Bloated dependencies&lt;/li&gt;
&lt;li&gt;Toolchain quirks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So next time your Lighthouse score drops or your TTI climbs, don’t assume your bundler saved you.&lt;br&gt;
&lt;strong&gt;Open the analyzer. Inspect the output. Trust nothing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because sometimes…&lt;br&gt;
&lt;strong&gt;Your bundle is lying to you.&lt;/strong&gt; &lt;/p&gt;




</description>
      <category>webdev</category>
      <category>webperf</category>
      <category>javascript</category>
      <category>frontend</category>
    </item>
    <item>
      <title>That One Time a CSS Variable Took Down Production</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Fri, 30 May 2025 19:57:21 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/that-one-time-a-css-variable-took-down-production-mnn</link>
      <guid>https://forem.com/abhinavshinoy90/that-one-time-a-css-variable-took-down-production-mnn</guid>
      <description>&lt;p&gt;Let me tell you a story. This is when I was working at a startup.&lt;br&gt;
It starts like most do: on a Friday, with good intentions and a small, seemingly harmless CSS tweak...&lt;/p&gt;
&lt;h2&gt;
  
  
  🧪 The Setup
&lt;/h2&gt;

&lt;p&gt;We had just rolled out a long-awaited design system refresh. Among the many visual improvements: cleaner spacing, a refined color palette, and (drumroll) CSS custom properties — aka, variables.&lt;/p&gt;

&lt;p&gt;It looked something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nd"&gt;:root&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--primary-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#1a73e8&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--button-padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.75rem&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We used these everywhere. Clean, reusable, and easy to override — what's not to love?&lt;/p&gt;

&lt;p&gt;Except… one tiny variable was waiting to cause chaos.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ The Change
&lt;/h2&gt;

&lt;p&gt;A designer requested a quick adjustment:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Can we tone down the primary button color just a bit?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Easy. I updated &lt;code&gt;--primary-color&lt;/code&gt; to a new hex value in the design token file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;--primary-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--color-primary-base&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--color-primary-base&lt;/code&gt; was defined in a separate file, but I was confident everything was wired up. After all, we had a theme system, layered variables, and fallbacks. What could go wrong?&lt;/p&gt;

&lt;p&gt;I pushed the change. CI passed. Code deployed. Weekend mode: activated.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔥 The Crash
&lt;/h2&gt;

&lt;p&gt;Within minutes, the support channel lit up.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Buttons are invisible.”&lt;br&gt;
“I can’t click anything.”&lt;br&gt;
“Login page is blank.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Wait, what?&lt;/p&gt;

&lt;p&gt;I opened the site. The buttons were gone. Not just colorless — completely invisible. No background. No border. Just floating text. In some places, not even that.&lt;/p&gt;




&lt;h2&gt;
  
  
  🕵️‍♂️ The Investigation
&lt;/h2&gt;

&lt;p&gt;After some rapid-fire inspection in DevTools, I saw this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;background-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--primary-color&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...but &lt;code&gt;--primary-color&lt;/code&gt; was resolving to... nothing. &lt;code&gt;undefined&lt;/code&gt;. Empty. No fallback.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;Because I mistakenly assumed &lt;code&gt;--color-primary-base&lt;/code&gt; was always defined.&lt;br&gt;
But in production, due to conditional theming logic and a bundler optimization, it was &lt;em&gt;missing&lt;/em&gt; from the root scope. 😬&lt;/p&gt;

&lt;p&gt;As a result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;--primary-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--color-primary-base&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;...evaluated to &lt;code&gt;--primary-color:&lt;/code&gt; (i.e., empty), and so &lt;code&gt;background-color&lt;/code&gt; inherited nothing.&lt;/p&gt;

&lt;p&gt;No fallback. No warnings. Silent failure. And boom — the UI melted.&lt;/p&gt;




&lt;h2&gt;
  
  
  💡 The Fix
&lt;/h2&gt;

&lt;p&gt;I hotfixed it by adding a default fallback:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;--primary-color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--color-primary-base&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="err"&gt;#1&lt;/span&gt;&lt;span class="nt"&gt;a73e8&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then updated the build step to ensure all token layers were correctly bundled and available in the final CSS.&lt;/p&gt;

&lt;p&gt;Crisis averted. Lessons painfully learned.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 What I Learned
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;CSS Variables Don’t Fail Loudly&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Unlike JavaScript, CSS doesn’t throw. If a variable is missing, it silently fails and can break styles in subtle (or dramatic) ways.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;strong&gt;Always Use Fallbacks&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--text-color&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;black&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Always assume a variable might be missing — especially in dynamic themes, design systems, or multi-team environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Linting Can Save You&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;A linter or PostCSS plugin that validates custom properties and detects missing ones would’ve caught this. Use tools to catch what your eyes miss.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Test Like Production&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Don’t assume your local/staging setup reflects real-world conditions. Tree-shaking or conditional loading might alter what CSS is available in production.&lt;/p&gt;




&lt;h2&gt;
  
  
  🎯 Bonus Tip: Use CSS Custom Properties Intentionally
&lt;/h2&gt;

&lt;p&gt;They’re powerful — great for theming, dynamic UI changes, and reducing repetition.&lt;br&gt;
But they’re also fragile when layered, abstracted, or conditionally injected.&lt;/p&gt;

&lt;p&gt;Use them wisely. And don’t forget the humble fallback value.&lt;/p&gt;


&lt;h2&gt;
  
  
  🫣 Final Thought
&lt;/h2&gt;

&lt;p&gt;This little bug cost us 45 minutes of downtime, a Friday evening fire drill, and a new entry in the postmortem doc titled &lt;em&gt;“CSS Can Break Production Too.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The moral of the story? &lt;strong&gt;Even the smallest change in a CSS variable can ripple into disaster.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So next time you write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;--something&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;var&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--something-else&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ask yourself: &lt;em&gt;What if that’s undefined?&lt;/em&gt;&lt;br&gt;
And maybe — just maybe — you’ll avoid your own invisible button catastrophe.&lt;/p&gt;




</description>
      <category>css</category>
      <category>production</category>
      <category>investigation</category>
      <category>webdev</category>
    </item>
    <item>
      <title>🔧 Top 10 Chrome Extensions for Web Developers (2025 Edition)</title>
      <dc:creator>Abhinav Shinoy</dc:creator>
      <pubDate>Sun, 25 May 2025 05:33:47 +0000</pubDate>
      <link>https://forem.com/abhinavshinoy90/top-10-chrome-extensions-for-web-developers-2025-edition-4c1p</link>
      <guid>https://forem.com/abhinavshinoy90/top-10-chrome-extensions-for-web-developers-2025-edition-4c1p</guid>
      <description>&lt;p&gt;Whether you’re building modern web apps or optimizing existing sites, Chrome extensions can save you hours and offer deep insights into what’s really happening under the hood. From performance analysis to debugging tools, these browser companions have become essential in a developer’s workflow.&lt;/p&gt;

&lt;p&gt;Here are the top 10 Chrome extensions that can supercharge your web development game&lt;/p&gt;




&lt;h2&gt;
  
  
  1. &lt;strong&gt;React Developer Tools&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you’re building React apps, this is non-negotiable. React Developer Tools lets you inspect the React component tree, props, and state directly in the Chrome DevTools panel.&lt;/p&gt;

&lt;p&gt;🔍 Best for: Debugging component hierarchies and props/state issues in React apps.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi" rel="noopener noreferrer"&gt;React Developer Tools&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2. &lt;strong&gt;Redux DevTools&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Working with Redux? This tool lets you monitor actions and state changes in real time with time-travel debugging, making it a go-to for debugging complex state flows.&lt;/p&gt;

&lt;p&gt;🧭 Best for: Inspecting and debugging Redux state transitions.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd" rel="noopener noreferrer"&gt;Redux DevTools&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  3. &lt;strong&gt;Load Time&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Load Time offers an instant view of page load duration directly in your toolbar, plus a visual timeline of key navigation events. It’s especially helpful for web performance auditing and benchmarking.&lt;/p&gt;

&lt;p&gt;🧠 Best for: Visualizing Critical Rendering Path insights.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chromewebstore.google.com/detail/load-time/jboepgdkcgchplagkfmgdhefadfahgda" rel="noopener noreferrer"&gt;Load Time&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  4. &lt;strong&gt;Wappalyzer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Wondering what stack a website is using? Wappalyzer tells you the frameworks, CMS, analytics, and more that power any site.&lt;/p&gt;

&lt;p&gt;💡 Best for: Tech stack discovery and competitor analysis.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/wappalyzer-technology-pro/gppongmhjkpfnbhagpmjfkannfbllamg" rel="noopener noreferrer"&gt;Wappalyzer&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  5. &lt;strong&gt;Lighthouse&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Though built into Chrome DevTools, this extension gives one-click access to full audits. Lighthouse evaluates performance, accessibility, SEO, and best practices.&lt;/p&gt;

&lt;p&gt;💡 Best for: Running automated audits for performance and quality.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk" rel="noopener noreferrer"&gt;Lighthouse&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  6. &lt;strong&gt;VisBug&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Edit and inspect styles visually right on the page — no need to dive into DevTools. VisBug lets you nudge layouts, tweak padding, and test designs with a designer-friendly UI.&lt;/p&gt;

&lt;p&gt;🎨 Best for: Visual style tweaking and layout debugging.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/visbug/cdockenadnadldjbbgcallicgledbeoc" rel="noopener noreferrer"&gt;VisBug&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  7. &lt;strong&gt;ColorZilla&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Eyedrop any color from a webpage, generate gradients, and explore advanced color tools.&lt;/p&gt;

&lt;p&gt;🎯 Best for: Picking, copying, and managing colors across the web.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp" rel="noopener noreferrer"&gt;ColorZilla&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  8. &lt;strong&gt;WhatFont&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Hover over any text to find out what font is being used — simple and effective.&lt;/p&gt;

&lt;p&gt;🖋 Best for: Typography exploration and font debugging.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chromewebstore.google.com/detail/whatfont/jabopobgcpjmedljpbcaablpmlmfcogm" rel="noopener noreferrer"&gt;WhatFont&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  9. &lt;strong&gt;JSON Viewer&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Make raw JSON responses readable in the browser with collapsible trees and color syntax highlighting.&lt;/p&gt;

&lt;p&gt;📦 Best for: Reading and navigating API responses with ease.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/json-viewer/aimiinbnnkboelefkjlenlgimcabobli" rel="noopener noreferrer"&gt;JSON Viewer&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  10. &lt;strong&gt;ModHeader&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Edit request headers (and responses too). Test APIs, simulate conditions, or debug CORS issues with ease.&lt;/p&gt;

&lt;p&gt;📦 Best for: Simulating HTTP requests with custom headers.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://chrome.google.com/webstore/detail/modheader/idgpnmonknjnojddfkpgkljpfnnfcklj" rel="noopener noreferrer"&gt;ModHeader&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;The right Chrome extensions can turn your browser into a full-fledged web development environment. Whether you’re debugging rendering performance or tweaking visuals on the fly, these tools offer speed, clarity, and precision.&lt;/p&gt;

&lt;p&gt;💬 Got a favorite that didn’t make the list? Share it in the comments — we’re always hunting for great tools.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>chrome</category>
      <category>extensions</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
