<?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>DEV Community: Vo Minh Khoi</title>
    <description>The latest articles on DEV Community by Vo Minh Khoi (@vominhkhoii).</description>
    <link>https://dev.to/vominhkhoii</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4231765%2Fb6f3c33d-2b32-42e0-bc0a-4a75d933b8f7.jpg</url>
      <title>DEV Community: Vo Minh Khoi</title>
      <link>https://dev.to/vominhkhoii</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vominhkhoii"/>
    <language>en</language>
    <item>
      <title>My Next.js articles shipped inside a hidden div, and nothing warned me</title>
      <dc:creator>Vo Minh Khoi</dc:creator>
      <pubDate>Sat, 07 Nov 2026 08:59:18 +0000</pubDate>
      <link>https://dev.to/vominhkhoii/my-nextjs-articles-shipped-inside-a-hidden-div-and-nothing-warned-me-i57</link>
      <guid>https://dev.to/vominhkhoii/my-nextjs-articles-shipped-inside-a-hidden-div-and-nothing-warned-me-i57</guid>
      <description>&lt;p&gt;My pages looked fine in a browser. Google was indexing them. Then I read the HTML the way a crawler reads it, with no JavaScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; https://your-site.com/some-page &lt;span class="nt"&gt;-A&lt;/span&gt; &lt;span class="s1"&gt;'OAI-SearchBot/1.0'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There was a header, an empty slot and a footer. The article came after the footer, inside &lt;code&gt;&amp;lt;div hidden id="S:1"&amp;gt;&lt;/code&gt;. A small inline script moves it into the slot when the page loads.&lt;/p&gt;

&lt;p&gt;Googlebot runs that script. A crawler that doesn't run JavaScript gets a hidden block at the bottom of the page. I can't see inside every crawler to know what it does with that. I didn't want to bet my pages on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cause
&lt;/h2&gt;

&lt;p&gt;One wrapper I had written on purpose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt; &lt;span class="na"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Content&lt;/span&gt; &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Suspense&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I assumed a boundary that finishes at build time gets inlined. Not always. React has an option called &lt;code&gt;progressiveChunkSize&lt;/code&gt;, 12,800 bytes by default. A boundary bigger than that gets outlined: the slot goes out first, the content later. The rule is about size, not about waiting.&lt;/p&gt;

&lt;p&gt;You can prove it with nothing async at all. I rendered a plain Suspense boundary with React 19.3's &lt;code&gt;renderToPipeableStream&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Boundary size&lt;/th&gt;
&lt;th&gt;Article hidden after the footer?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2,000 bytes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12,000 bytes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14,000 bytes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;40,000 bytes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;40,000 bytes, with &lt;code&gt;progressiveChunkSize&lt;/code&gt; raised&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The limit counts HTML bytes, not words. Tailwind classes count. Even my shortest page, a list of five calculators, crossed it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to check
&lt;/h2&gt;

&lt;p&gt;Find your &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; in the raw HTML. If &lt;code&gt;&amp;lt;div hidden id="S:&lt;/code&gt; comes right before it, you have this.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix
&lt;/h2&gt;

&lt;p&gt;Stop wrapping the article. With Cache Components on, reading &lt;code&gt;params&lt;/code&gt; outside Suspense fails the instant navigation check, so routes with a dynamic param also need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;instant&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That turns off a check, not prerendering. My pages still answer &lt;code&gt;x-nextjs-prerender: 1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Most of my fallbacks were &lt;code&gt;null&lt;/code&gt;, so I lost nothing there. A blank page was never instant in any way a person would value. On my docs I did give up a loading skeleton. I took that trade.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before and after
&lt;/h2&gt;

&lt;p&gt;On a &lt;a href="https://kallo.fit/en/calories/poke-bowl" rel="noopener noreferrer"&gt;calorie page on Kallo&lt;/a&gt;, the words outside the hidden block went from 107 to 779. Nothing is hidden now.&lt;/p&gt;

&lt;p&gt;No test caught this. The types were fine, the page looked right, and Google was happy. It only shows up if you read the bytes.&lt;/p&gt;

&lt;p&gt;Check your own site. It takes ten seconds.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>seo</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
