miinideckmiinideck
PricingUse casesBlog
Sign in
Prompting AI

Light-weight AI-generated pages: prompts and post-edits for fewer kilobytes (2026)

AI builders default to heavy: full framework bundles, web fonts, icon libraries, generous markup. Prompts that ship lean from the start, plus the trim pass for what slipped through.

By miinideck ai research team·July 14, 2026·7 min read
TL;DR
  • AI builders default to generous: full Tailwind via CDN, React or Vue bundled in, web fonts from Google, icon libraries with hundreds of unused icons, generous markup. A "simple landing page" often ships at 2-4MB.
  • Two passes cut the size: a prompt-side specification that asks for vanilla output from the start, and a post-edit trim that strips what slipped through.
  • Most landing pages and reports don't need a framework. Vanilla HTML + a few KB of inline CSS + minimal JS renders the same visual at one-tenth the weight.
  • For pages that ship as a deliverable or live at a private link, the size affects how the page feels on cellular — 200KB renders instantly; 2MB takes 8 seconds and most viewers don't wait.

You prompted Lovable to build a landing for your product. The output looks great in the preview. You download the HTML and check the file size: 2.4MB. On hotel Wi-Fi it takes 8 seconds to render. On cellular it takes longer; some viewers close the tab before the page finishes.

What happened: the AI tool defaulted to its standard stack — Tailwind CSS via CDN, a JavaScript framework bundled in, Google Fonts pulled at runtime, a Lucide icon library with 1500 unused icons, generous wrapper divs everywhere. Every default is defensible in isolation; together they make a small page heavy.

Trimming the size is two passes — one in the prompt, one after.

What makes AI output heavy

The common contributors, in rough order of weight impact:

  • Framework bundle (React + ReactDOM + tooling) — 130-180KB minified, before your code
  • Tailwind CDN / full CSS framework — 250KB+ (the CDN version doesn't tree-shake)
  • Icon library (Lucide React, Heroicons, Font Awesome) — 200KB-1MB if imported as a whole library
  • Web fonts from Google (Inter + JetBrains Mono + Plus Jakarta Sans) — 100-300KB per font family with all weights
  • Unused JS modules (date pickers, charting libraries, form helpers imported but never used) — 50-500KB
  • Generous markup (10-level deep div nesting, repeated utility classes, inline SVG repeated per icon) — 30-200KB

For a typical landing-page output, the total lands somewhere between 1MB and 3MB. Most of it is bytes the page doesn't need.

The prompt-side pass — ask for vanilla upfront

The fastest way to ship light is to never ship heavy. The prompt that asks for vanilla output from the first generation:

Build this as a vanilla HTML page. No React, no Vue, no framework. CSS in a <style> block (no Tailwind CDN — write the specific styles needed). System font stack only (no Google Fonts, no web font imports). Icons as inline SVG (no icon library). JavaScript only where the page genuinely needs interactivity, inline in <script>. The output should be one HTML file under 200KB.

For tools that lean heavily toward framework output (v0 especially):

The deliverable is a single HTML page that ships to one client; it doesn't need to be a deployable React app. Use vanilla HTML + inline CSS + minimal vanilla JS. No build step. No npm dependencies. The reader opens the file in a browser; the file is the whole product.

This cuts the typical 2MB output down to 100-300KB on the first generation. The visual usually stays equivalent — most landing-page designs don't actually depend on the framework being there, the framework was just the AI tool's default starting point.

For tools that default to multi-file project scaffolds (Lovable, Cursor with code-mode), the explicit "one HTML file, no build step" framing flips the scaffold off.

The pattern is the same as the cross-tool portable-HTML prompts — being specific about what you don't want produces leaner output than asking for "a simple page."

The post-edit pass — for what slipped through

For pages already generated, four trim moves catch most of the remaining weight.

1. Strip unused Tailwind classes

If the output uses Tailwind, the Tailwind CDN serves the whole framework. The fix is to compile a static stylesheet with only the classes the page actually uses:

npx tailwindcss -i input.css -o output.css --content "./page.html"

Drop the resulting output.css inline into the HTML, remove the CDN script tag. Typical reduction: 250KB → 5-15KB for a landing page.

For Claude artifacts specifically, the export checklist covers the Tailwind step in more detail.

2. Remove unused JS modules

Open DevTools → Coverage tab → reload the page. The Coverage tool shows which JS bytes ran versus which sat unused. Anything over 50% unused is a candidate for removal.

For AI-generated pages that import the whole lucide-react package for 3 icons, the fix is to replace the imports with inline SVG (copy the 3 specific icons from the Lucide site as raw SVG, paste inline). Cuts 200KB+ down to 1-2KB.

3. Compress and inline images selectively

For images under 50KB after conversion to WebP, base64-encode and inline. For larger images, keep them external on an asset host (or use lazy loading via the native loading="lazy" attribute).

Squoosh handles the compression locally in the browser — drag in a PNG, get a WebP at 60-80% smaller for visually equivalent quality.

4. Minify the output

Run the final HTML through a minifier. The biggest single win:

npx html-minifier-terser page.html -o page.min.html --collapse-whitespace --minify-css --minify-js

Typical compression: 30-50% reduction on AI-generated output (the wrapper-div pattern compresses well; the markup gets quite redundant).

Target sizes by page type

What's worth aiming for, by use case:

  • Landing page — under 200KB total. Renders instantly on cellular; reads as professional polish.
  • Long-form report or dashboard — under 500KB. Acceptable when the page genuinely has a lot of content.
  • Interactive document with charts — under 1MB. Charts add weight; embedded data adds more. Still loadable on most connections without obvious delay.
  • Multi-page app or media-heavy site — size depends on what's loaded; not a fair comparison to a static page.

For AI product landings shipped as a portfolio piece, the first two are the right targets.

Once the page is trimmed, drop it at a private link to test the actual feel on a different network — the local browser cache hides a lot of perceived weight. Free, no card, 7-day self-destruct, useful for sanity-checking how the page lands on cellular.

Try it free (no signup)

Measuring without overthinking

Three quick checks, in order of effort:

  1. Browser DevTools → Network tab → reload. Total transferred size at the bottom. Aim for under 500KB for most landings.
  2. Lighthouse (built into Chrome DevTools). Run a "Performance" audit; the report shows total transferred bytes, breakdown by category, and specific suggestions.
  3. PageSpeed Insights (online). Tests from a remote location with mobile-equivalent CPU + network throttling. Slower than local but a better proxy for the actual receiver's experience.

For most workflows, the DevTools number is enough. Lighthouse and PageSpeed are worth running once before the final ship.

What this isn't

Trimming page weight is for static deliverables — landings, reports, portfolios. It's not for:

  • Production web apps — the framework bundle is reused across many pages; the per-visit cost is one-time after caching. Optimizing the bundle is real work but a different shape of problem.
  • Genuinely media-heavy content — a portfolio with 50 hi-res images can't be 200KB; the trim work is about which images load eagerly vs lazily, not about getting under a fixed size budget.
  • Highly interactive dashboards — when the charting library is the value, including it is the right call.

The light-weight pass is for the case where the AI tool's defaults brought in more than the page needs. For most landing pages, reports, and one-off deliverables, that's most of the time.

For static HTML files that ship as a deliverable, the self-contained inlining work and the lightweight trim usually happen in the same pass — the goal is one portable file that's small enough to feel instant.

More in Prompting AI

The Skill is installed and publishing still fails: how to find the layer that broke (2026)

Nothing happened when you asked Claude to publish. There are four separate things it could mean, they look identical from the chat window, and each has a different fix. Here's how to tell them apart in order.

August 4, 2026·8 min read

Prompting AI to add forms / RSVP / contact UI without a backend (2026)

AI builders ship beautiful forms with no idea where the submissions go. Three shapes that actually work — mailto, third-party embed, serverless route — and the prompts that make each one ship cleanly.

August 1, 2026·7 min read

Prompt patterns to ship portable, self-contained HTML from any AI tool (2026)

AI tools default to modular HTML — clean for development, fragile for one-file delivery. Cross-tool prompt templates that produce a single portable file from the first generation.

June 11, 2026·7 min read

Send your own private link.

miinideck turns a single HTML file into an unguessable link with optional password and expiry. Default-private, never indexed.

Try it free →See pricing
miinideck

HTML files, finally as links — for AI builders, agencies, and consultants. Default-noindex, default-private, default-yours.

Product

  • Pricing
  • Use cases
  • Try it free

Resources

  • Blog
  • Featured on
  • Report abuse

Legal

  • Privacy
  • Terms
© 2026 miinideckMade for people who don't want their work indexed.