ウェブサイトの速度最適化:テスト、修正、再テストの方法
ウェブサイトの速度最適化テストプラン:無料でウェブサイトの速度を確認し、最も遅い部分を見つけ、重要な修正を行い、再テストの方法。
Website speed optimization works best as a loop: test, fix the biggest problem, and re-test. Most slow sites have one or two causes that account for most of the delay, and fixing those beats a long list of small tweaks. This guide covers how to run a fair test, how to find what's slow, the fixes that make the most difference, and how to check that they worked.
Step 1: run a fair baseline test
Before you change anything, measure where you are, so you can tell whether a fix helped.
- Pick the pages that matter. Your homepage, your most visited page, and one important template, such as a product or blog post page.
- Test on mobile. Use PageSpeed Insights or our free website speed test, which both default to a simulated mid-range phone.
- Run each test three times and note the middle result. Scores move a few points between runs for reasons outside your control.
- Write down the key numbers: the performance score, Largest Contentful Paint (LCP), Total Blocking Time and Cumulative Layout Shift (CLS), and, if shown, the real-user Core Web Vitals assessment.
Step 2: find the slowest part
Don't start with whatever fix is easiest. Start with the metric that's furthest from good.
- LCP is slow: the main content takes too long to appear. Check which element PageSpeed Insights names as the LCP element. It's usually a hero image, a large heading or a video poster.
- Total Blocking Time is high (or INP fails in the field): JavaScript keeps the browser busy, so the page is slow to respond.
- CLS is high: elements move while the page loads.
- Time to First Byte is slow: the server takes too long to respond, and everything else waits.
For a detailed timeline of every file, a waterfall view in WebPageTest or GTmetrix shows exactly which request holds things up.
Step 3: apply the fixes that matter most
Images (usually the biggest win)
- Resize images to the size they're displayed at. A 4,000-pixel photo shown 800 pixels wide wastes most of its download.
- Use modern formats such as WebP or AVIF, which are typically much smaller than JPEG or PNG at similar quality.
- Serve responsive sizes with
srcsetandsizes, so phones download smaller files. - Lazy-load images below the fold with
loading="lazy", but never the LCP image. - Prioritise the LCP image: add
fetchpriority="high"to it, and make sure it's in the HTML rather than loaded later by JavaScript.
JavaScript
- Remove what you don't use: old plugins, unused libraries and duplicate tracking scripts.
- Defer non-essential scripts with
deferorasync, so they don't block the first view. - Load third-party scripts later: chat widgets, embedded videos and social buttons can load after the main content or when the visitor interacts.
- Break up long tasks: if one script runs for hundreds of milliseconds, the page can't respond to taps. Splitting the work improves INP.
CSS and fonts
- Keep the CSS for the first screen small, and load the rest without blocking.
- Use fewer font files and weights, and set
font-display: swapso text shows in a fallback font while the web font loads. - Preload your main font if it's needed for above-the-fold text.
Server and caching
- Turn on compression (Brotli or gzip) for HTML, CSS and JavaScript.
- Cache static files with long cache lifetimes, so returning visitors don't download them again.
- Use a CDN to serve files from locations close to your visitors.
- Cache pages on content sites, so the server doesn't rebuild every page on every visit. A slow Time to First Byte often improves dramatically with page caching or better hosting.
Layout stability
- Set width and height (or an aspect ratio) on images and videos, so the browser reserves space.
- Reserve space for ads, embeds and banners, so they don't push content down when they load.
- Avoid inserting content above what the visitor is reading, such as a late-loading cookie bar that pushes the page down.
Step 4: re-test the right way
- Re-run the same test, on the same page, device setting and tool, three times again.
- Compare the middle result with your baseline, metric by metric, not just the score.
- Check one change at a time where you can, so you know what helped. If a change made no difference, keep it only if it has another benefit.
- Wait for field data. Real-user Core Web Vitals in PageSpeed Insights and Search Console cover the last 28 days, so allow about four weeks for a fix to show fully.
Common speed optimization mistakes
- Optimising the wrong page. Fixing the homepage when most visitors land on blog posts or product pages. Check your analytics for your top landing pages first.
- Lazy-loading the main image. Adding
loading="lazy"to every image, including the hero image, delays the LCP. Only lazy-load images below the first screen. - Stacking optimisation plugins. Two caching or minification plugins doing the same job can conflict and break pages. Use one, and test after each change.
- Measuring once. A single test run can be several points off. Compare middle results of several runs.
- Forgetting third-party scripts. Removing your own code but keeping five tracking tags and a chat widget can leave most of the problem in place.
Speed optimization on WordPress and Shopify
On WordPress, start with a good host and one caching plugin, then check which plugins load scripts on every page; many add CSS and JavaScript even where they aren't used. Compress images on upload, and choose a lightweight theme. On Shopify, the theme and apps matter most: remove apps you no longer use (some leave code behind, so check the theme files), compress product images before uploading, and keep the number of sections on the homepage reasonable. On both, re-test after every plugin, app or theme change.
How do I check website speed for free?
PageSpeed Insights is free with no account and shows both lab results and real-user data. Our free website speed test runs the same mobile test without signup and gives you a badge for your site. Lighthouse in Chrome DevTools tests pages that aren't public yet. For a comparison of the free options, see the best free website speed tests.
Which fixes give the biggest improvement?
For most sites, in this order: optimising the main image and other large images, removing or deferring unnecessary JavaScript (especially third-party scripts), and speeding up the server response with caching. Fonts and CSS usually come next. The suggestions in PageSpeed Insights are ranked by estimated savings for your specific page, which is the best guide.
How fast should my website be?
Aim for the Core Web Vitals "good" thresholds for real visitors: Largest Contentful Paint of 2.5 seconds or less, Interaction to Next Paint of 200 milliseconds or less, and Cumulative Layout Shift of 0.1 or less, for at least 75% of visits. A Lighthouse performance score of 90 or more is "good" in the lab, but passing Core Web Vitals in the field matters more.
Does website speed affect SEO?
Core Web Vitals are part of the page experience signals Google's ranking systems use, but relevance comes first, so speed usually acts as a tie-breaker between similar pages. The bigger effect is on visitors: a page that loads quickly keeps more of the people who arrive. Our guide to improving your Lighthouse score goes deeper on the lab side.
How long does speed optimization take?
The first round of fixes, usually images, caching and removing unneeded scripts, often takes an afternoon to a day on a typical site and gives most of the improvement. Deeper work, such as rewriting heavy JavaScript or changing themes or hosting, takes longer and is worth doing only if the metrics are still failing after the first round. Plan a short re-test after each change and a fuller review once real-user data has updated.
A speed optimization checklist
- Baseline test on mobile, three runs, numbers written down.
- Identify the metric furthest from good.
- Optimise the LCP element and large images.
- Remove or defer unnecessary JavaScript and third-party scripts.
- Turn on compression, caching and, if useful, a CDN.
- Set image dimensions and reserve space for embeds.
- Re-test the same way and compare metric by metric.
- Check field data again after about four weeks.
Related free tools and guides
- Free website speed test — check website speed free, on mobile
- How to read your Google PageSpeed Insights results
- Lighthouse checker — all four Lighthouse scores