---
title: "Beware of client-side JavaScript content delivery"
canonical: https://www.ianlurie.com/writing/dont-use-javascript/
date: 2026-11-20
category: "Digital Marketing"
description: "A quick guide for when to use JavaScript to load content client-side, when not to, and how to test for it."
---
Most of the time, using client-side JavaScript to deliver content to a webpage is risky, unnecessary, and looks ridiculous.  It's like a poodle cut on a grizzly bear.

<span class="sidenote sidenote-plain">If you don't know what "using client-side JavaScript to deliver content to a webpage" means, keep reading. I've got an easy test below.</span>

Here's a quick guide for when to do it, when not to, and how to test for it:

1. First, understand that AI search **ignores content loaded using JavaScript**. 
2. A user's click shouldn't **load** content. It should **reveal** it. Never rely on user interaction and JavaScript to load content into the DOM. Load it when you load the page.
3. The **only** exception to this rule is app-like experiences where user interaction with a page fundamentally changes the content on the page. A calculator, a wizard, or another type of tool are all good examples.
4. Hide content in familiar ways, and only when absolutely necessary. Tabs, accordions, etc. are nifty, and they may seem like a great mobile design fix, but they deemphasize information. Save them for FAQs and other UX stuff that users easily recognize.
5. Only use preloaders if you have big, slow-loading components or pages that **have to be** big, slow-loading components or pages. Don't use them to hide bad image compression or lousy code. <a href="https://www.ianlurie.com/writing/compress-images-with-squoosh/" rel="noopener">Compress those images</a> and build light fast pages, instead.

## A quick test

If you're not sure what any of this means, here's an easy test:

1. Download the <a href="https://chromewebstore.google.com/detail/web-developer/bfbameneiokkgbdmiekhjnmfkcnldhhm?hl=en-US&pli=1" rel="noopener">Web Developer Toolbar</a>
2. Click "Disable JavaScript" ![Disabling JavaScript in Web Developer Toolbar.](./dont-use-javascript/web-developer.webp)
3. Load the page you want to test

If the whole page is blank:

![A JavaScript-loaded web page. Oops. That's not good.](./dont-use-javascript/blank-page.webp)

Or if parts of the page are blank:

![Also not good: Parts of the page are JavaScript-loaded content.](./dont-use-javascript/blank-parts.webp)

You **may** have a problem. Talk to your developer. Ask them:

"Is this page's content in the first HTML delivered by the server?"

If the answer isn't "Yes, absolutely," then you **definitely** have a problem.

If the answer is "Yes, it's just hidden," then think carefully: Does the non-JavaScript version of the page seem usable? Is the most important stuff visible when the page loads? If not:

1. Consider which content you absolutely want present, no matter what
2. Un-hide that content. Make sure it's visible with and without JavaScript
3. Repeat until you've got a page you like

If the answer is, "This is how the big sites do it," gently slap whoever said that. Then show them big sites like Disney.com, which looks like this without JavaScript:

![Disney don't need no stinking JavaScript.](./dont-use-javascript/disney.webp)

JavaScript content delivery isn't always bad. Hidden content isn't always bad. But they're often unnecessary. Like that ursine poodle cut. Think it through.
