Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Fix Screenshots Showing Skeleton Loaders Instead of Content

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Skeleton loaders (those gray placeholder blocks that appear while a page loads) are meant to be temporary. When they show up in your screenshots instead of actual content, it usually means the screenshot tool captured the page before the data finished loading. This guide walks you through the most effective ways to ensure your screenshots capture fully loaded content, whether you're using a browser, a dedicated screenshot tool, or an automated testing script.

What You'll Need

  • A web browser (Chrome, Firefox, Edge, or Safari) for manual screenshots
  • Access to the page you're trying to capture
  • A screenshot tool – built-in browser tools, browser extensions, or standalone apps like Snagit or ShareX
  • For automated screenshots: a scripting environment (like Node.js with Puppeteer or Playwright)

Step-by-Step

  1. Identify the cause. Open the page in your browser and watch it load. If you see skeleton loaders flash and then disappear, the issue is timing. If they persist, the problem might be a slow API or a broken script – fix that first.
  2. Wait for the page to fully load before taking the screenshot. In most browsers, wait until the loading spinner in the tab stops and the page appears stable. For dynamic content (like feeds or dashboards), wait an extra 2-3 seconds after the initial load.
  3. Use the browser's built-in screenshot feature. In Chrome or Edge, open DevTools (F12), click the three-dot menu in the top-right of DevTools, and select “Capture full size screenshot.” This often waits for the page to settle better than the OS-level screenshot.
  4. If using a browser extension, check its settings. Many extensions (like Awesome Screenshot or Lightshot) have a “delay before capture” option. Set it to 3–5 seconds to give the page time to load.
  5. For automated screenshots with Puppeteer or Playwright, add explicit waits. Use page.waitForSelector('selector-of-content') to wait for a specific element that only appears after the data loads. For example:
    await page.waitForSelector('.article-content', { timeout: 10000 });
    Then take the screenshot.
  6. Disable skeleton loaders in the code (if you control the site). If you're a developer, you can add a CSS class to hide the skeleton while testing, or use a query parameter like ?disableSkeleton=true to skip them.
  7. Use a network throttle to your advantage. In Chrome DevTools, go to the Network tab and set throttling to “Fast 3G” or “Slow 4G.” This slows down the load, giving you more time to see when the skeleton disappears – but you'll need to wait longer before capturing.
  8. Take a screenshot after a specific event. If the page loads content via JavaScript after a scroll or click, trigger that action first, then wait for the new content to appear before capturing.

Common Mistakes

  • Not waiting long enough. The most common mistake is taking the screenshot immediately after the page starts loading. Always wait for the network activity to settle.
  • Using OS-level screenshots (like Print Screen) on slow pages. These capture whatever is on screen at that instant, which is often the skeleton.
  • Forgetting to wait for lazy-loaded content. Many pages load images or data only when you scroll to them. If you're capturing a full-page screenshot, ensure you scroll through the entire page first.
  • Assuming the page is loaded when the tab spinner stops. The spinner stops when the initial HTML is parsed, but JavaScript may still be fetching data.
  • Not considering the network environment. A slow connection or a blocked API can cause skeletons to persist. Test on a reliable network.

Tips

  • Use a screenshot tool that waits for network idle. Playwright and Puppeteer have a waitUntil: 'networkidle0' option that waits until there are no more than 0 network connections for 500ms. This is often the most reliable way.
  • Add a small buffer. Even after the content appears, wait an extra 500ms to ensure fonts and images are fully rendered.
  • Check for console errors. If the content never loads, open the browser console (F12) and look for errors. A failed API call might be the root cause.
  • Use a headless browser with a fixed viewport. For consistent screenshots, set a specific viewport size (e.g., 1280x800) in your automation script.
  • Consider using a screenshot service. Services like BrowserStack or LambdaTest allow you to set a delay before capture, and they run on fast servers, reducing the chance of skeletons.

Troubleshooting

If you've tried the steps above and still get skeletons, try these advanced fixes:

  • If the page uses infinite scroll or pagination: You may need to scroll to the bottom to trigger loading of all content. Use page.evaluate(() => window.scrollTo(0, document.body.scrollHeight)) in your script, then wait for new content to appear.
  • If the skeleton is caused by a specific API call: Use the Network tab to find the failing request. If it's a third-party API, you might need to mock it with a stub that returns test data.
  • If the page never loads content even in a normal browser: The issue is likely a bug in the website. Try clearing your cache, disabling browser extensions, or using an incognito window. If it still fails, report it to the site owner.
  • If you're using a screenshot tool that doesn't wait: Some tools have a “smart wait” feature – enable it. If not, use a different tool that supports delays.
  • If you're capturing a full-page screenshot and the bottom shows skeletons: The page likely lazy-loads content as you scroll. Use a tool that scrolls and captures in segments (like GoFullPage) and ensure it waits between scrolls.

Frequently Asked Questions

Why do skeleton loaders appear in screenshots but not when I view the page?

When you view the page, your brain processes the loading animation as temporary. A screenshot captures a single moment, often before the data arrives. The difference is timing – your screenshot is taken too early.

Can I disable skeleton loaders in the browser?

Not directly, but you can use browser extensions like “uBlock Origin” to block the script that shows them, or use CSS injection to hide the skeleton elements. However, this might break the page layout.

What is the best screenshot tool for avoiding skeleton loaders?

Tools that allow you to set a delay or wait for network idle are best. For manual screenshots, the browser's built-in capture is often better than OS-level tools. For automation, Playwright or Puppeteer with waitUntil: 'networkidle0' is reliable.

How long should I wait before taking a screenshot?

It depends on the page. Start with 5 seconds after the page appears to load. For heavy pages, wait until the network activity in DevTools stops. In automated scripts, use explicit waits for content elements instead of fixed times.

Is there a way to take a screenshot after a specific element is visible?

Yes, in automation tools you can wait for a selector. For example, in Playwright: await page.waitForSelector('.content-loaded'); then take the screenshot. This ensures the content is present.

What if the skeleton loaders never disappear even after waiting?

This indicates a real problem with the site – likely a broken API or JavaScript error. Open the browser console to see errors. If you're testing your own site, fix the underlying issue. If it's a third-party site, you may need to use a different approach, like capturing a cached version.