Website performance is the practice of making pages load quickly, respond consistently, and remain usable across devices, browsers, networks, and regions. A fast website is not only a design improvement. It is a reliability requirement because slow pages can feel broken, reduce conversions, increase bounce rates, and make incidents harder to distinguish from normal traffic spikes.
Performance depends on many layers working together: DNS lookup time, TLS negotiation, server processing, database queries, redirects, HTML size, images, JavaScript, CSS, third-party scripts, browser rendering, caching, and network distance. Improving speed means measuring each layer, removing waste, and making the fastest path the default path.
Website performance quick reference
| Area | What it affects | What to improve |
|---|---|---|
| DNS | How quickly a hostname resolves. | Use reliable DNS, avoid unnecessary CNAME chains, and keep records clean. |
| TTFB | How quickly the server begins responding. | Improve hosting, caching, database queries, application code, and backend capacity. |
| Images | Page weight and visual load speed. | Resize, compress, lazy load, and use modern formats such as WebP or AVIF where appropriate. |
| JavaScript | Interactivity and browser main-thread work. | Remove unused scripts, defer noncritical scripts, and reduce third-party tags. |
| CSS | Render blocking and layout speed. | Minify CSS, remove unused CSS, and inline only truly critical CSS when useful. |
| Caching | Repeat visit speed and server load. | Use page caching, browser caching, object caching, CDN caching, and correct cache headers. |
| CDN | Regional speed and global delivery. | Serve static assets from edge locations and cache public content close to visitors. |
Important website performance metrics
Recommended performance testing tools
Use more than one testing tool because each tool measures performance from a different location, browser environment, and methodology. A single score is less important than the specific bottlenecks the report identifies.
Response time, TTFB, and backend speed
A slow backend delays everything else. Before the browser can render the page, the server must accept the connection, process the request, run application code, query databases, generate HTML, and send the response. If this first step is slow, image optimization and frontend tuning may help only after the backend bottleneck is fixed.
Common causes of high TTFB
- Underpowered hosting or overloaded CPU, memory, disk, or PHP workers.
- Slow database queries, missing indexes, large options tables, or excessive autoloaded data.
- No full-page caching for pages that could safely be cached.
- Too many plugins, modules, middleware layers, or application hooks.
- Remote API calls that block page generation.
- Visitors located far from the origin server with no CDN or edge caching.
- Cache misses caused by cookies, query strings, logged-in sessions, or dynamic personalization.
How to improve TTFB
Enable page caching
Cache public HTML pages where possible so the server does not regenerate the same page for every visitor.
Optimize the database
Review slow queries, clean transients, reduce autoloaded options, and ensure tables are indexed appropriately.
Upgrade hosting resources
If CPU, memory, disk I/O, PHP workers, or database capacity are consistently saturated, performance tuning alone will not solve the issue.
Use a CDN
Serve cacheable content closer to visitors and reduce round trips back to the origin server.
Core Web Vitals
Core Web Vitals are user-experience metrics that help explain how fast a page appears, how responsive it feels, and whether the layout remains stable while loading. They are especially useful because they focus on what visitors experience rather than only what the server reports.
| Metric | What it measures | Common fixes |
|---|---|---|
| Largest Contentful Paint | How quickly the largest visible content element loads. | Optimize hero images, improve TTFB, preload critical assets, reduce render-blocking CSS, and use a CDN. |
| Interaction to Next Paint | How quickly the page responds to user interactions. | Reduce JavaScript, split long tasks, remove unnecessary third-party scripts, and defer noncritical work. |
| Cumulative Layout Shift | How much content shifts unexpectedly while loading. | Set image dimensions, reserve ad space, avoid injecting content above existing content, and load fonts carefully. |
Image optimization
Images are often the largest part of a web page. A visually simple page can still be slow if it loads oversized images, uncompressed screenshots, large PNG files, background images that are not visible, or high-resolution photos on small screens.
Image performance best practices
- Resize images to the maximum size actually displayed by the design.
- Compress images before uploading them to the site.
- Use WebP or AVIF for modern browsers when the file size is smaller and quality remains acceptable.
- Use JPEG for photographs when WebP or AVIF is not available.
- Use SVG for simple logos, icons, and vector illustrations when appropriate.
- Avoid uploading full-size camera images directly into website content.
- Use lazy loading for below-the-fold images.
- Set width and height attributes to reduce layout shift.
- Preload only the most important above-the-fold hero image when it improves LCP.
<img src="/assets/images/example.webp" width="1200" height="675" loading="lazy" alt="Example image">
Caching strategy
Caching stores reusable responses or assets so they do not need to be regenerated or downloaded every time. Correct caching can dramatically improve speed and reduce server load. Incorrect caching can show stale content, break logged-in sessions, or hide application changes.
| Cache type | Purpose | Best use |
|---|---|---|
| Browser cache | Stores static assets on the visitor's device. | Images, CSS, JavaScript, fonts, and versioned files. |
| Page cache | Stores generated HTML. | Public pages that are the same for many visitors. |
| Object cache | Stores database query results or computed objects. | Dynamic applications, WordPress, WooCommerce, and database-heavy sites. |
| CDN cache | Stores content at edge locations. | Static files and cacheable public pages served to visitors in multiple regions. |
| Opcode cache | Stores compiled PHP bytecode. | PHP applications such as WordPress, Laravel, and custom PHP apps. |
Recommended cache headers for static assets
Static assets with versioned filenames can usually be cached for a long time. HTML should usually have a shorter cache policy unless the site uses a controlled deployment and purge process.
Cache-Control: public, max-age=31536000, immutable
CDNs, Cloudflare, and global delivery
A content delivery network stores and serves content from edge locations closer to visitors. This can reduce latency, improve asset delivery, absorb traffic spikes, and reduce origin load. For many small and medium sites, using Cloudflare or another CDN is one of the highest-impact performance improvements available.
What a CDN can improve
- Static asset delivery for images, CSS, JavaScript, and fonts.
- Regional latency for visitors far from the origin server.
- Traffic spikes caused by campaigns, bots, or seasonal usage.
- Repeat-visit performance through browser and edge caching.
- Security posture through DDoS filtering, WAF rules, and bot controls when configured properly.
What a CDN may not fix by itself
- Slow uncached dynamic pages.
- Heavy JavaScript execution in the browser.
- Unoptimized images that are still too large.
- Slow third-party scripts.
- Poor database performance on logged-in or personalized pages.
Redirects and request chains
Redirects add extra round trips before the browser reaches the final page. One redirect may be acceptable. Multiple redirects can create avoidable latency, especially on mobile networks or long-distance connections.
Common redirect problems
- HTTP redirects to HTTPS, then non-www redirects to www, then a trailing slash redirect.
- Old marketing URLs redirecting through several historic paths.
- Redirect loops between CDN, application, and origin server rules.
- Mixed canonical rules between web server configuration and application plugins.
Bad chain: http://example.com https://example.com https://www.example.com https://www.example.com/ Better: http://example.com https://www.example.com/
Compression and transfer size
Text-based files such as HTML, CSS, JavaScript, JSON, XML, and SVG should usually be compressed with Brotli or gzip. Compression reduces transfer size and improves loading time, especially on slower networks.
- Use Brotli where supported for static text assets.
- Use gzip as a fallback for broad compatibility.
- Do not recompress images, videos, ZIP files, or already-compressed binary files.
- Confirm compression using browser DevTools or command-line headers.
Fonts and render performance
Web fonts can improve branding, but they can also slow first render if too many weights, styles, or external font files are loaded. Keep font usage intentional.
- Use fewer font families and fewer font weights.
- Preconnect to external font origins when external fonts are required.
- Use font-display: swap or an equivalent strategy where appropriate.
- Self-host fonts when it improves control and performance.
- Avoid loading icon fonts when a few inline SVG icons would be smaller.
JavaScript and CSS
JavaScript and CSS affect both download time and rendering time. Large files can delay rendering, while heavy scripts can block interaction even after the page appears visible.
Frontend optimization checklist
- Remove unused JavaScript and CSS.
- Minify production assets.
- Defer or async noncritical scripts.
- Split large bundles so each page loads only what it needs.
- Avoid loading multiple frameworks for simple pages.
- Load analytics, chat widgets, maps, embeds, and tracking scripts only where needed.
- Audit long tasks in browser DevTools.
WordPress performance
WordPress can be very fast when maintained and configured correctly. Most slow WordPress sites are not slow because WordPress itself is unusable. They are slow because of outdated software, excessive plugins, heavy themes, unoptimized images, no caching, slow hosting, database bloat, or too many third-party scripts.
WordPress maintenance essentials
- Update WordPress core regularly.
- Update themes and plugins regularly.
- Enable automatic updates for trusted plugins, themes, and WordPress core where appropriate.
- Remove inactive themes and plugins that are no longer needed.
- Replace abandoned plugins with maintained alternatives.
- Use a lightweight theme when performance matters.
- Keep PHP on a supported modern version provided by your host.
- Back up the site before major updates.
WordPress caching recommendations
- Enable full-page caching for public pages.
- Use object caching with Redis or Memcached when supported by the host.
- Enable OPcache for PHP.
- Use browser cache headers for static assets.
- Use CDN caching for images, CSS, JavaScript, and public pages where safe.
- Exclude carts, checkout pages, account pages, admin pages, and personalized content from public cache.
WordPress image and media recommendations
- Compress images before upload or use a trusted image optimization plugin.
- Serve WebP or AVIF when supported.
- Regenerate thumbnails after changing image sizes.
- Lazy load below-the-fold images and videos.
- Use embeds carefully because video, map, and social embeds can load large third-party scripts.
WordPress database recommendations
- Clean up expired transients, spam comments, revisions, and old plugin tables after confirming they are safe to remove.
- Review autoloaded options if the site has high memory usage or slow admin pages.
- Use a staging site for risky cleanup operations.
- Investigate slow queries instead of blindly deleting database content.
Hosting and server optimization
Hosting quality has a direct effect on performance. A well-optimized page can still be slow if the server is overloaded, far from visitors, limited by disk I/O, or constrained by too few PHP workers or database resources.
| Server layer | What to review |
|---|---|
| CPU | High CPU usage can slow PHP, database queries, compression, and dynamic page generation. |
| Memory | Low memory can cause swapping, process killing, or slow database performance. |
| Disk I/O | Slow disks affect database queries, cache reads, logs, uploads, and file operations. |
| PHP workers | Too few workers can create queues during traffic spikes. |
| Database | Slow queries, locks, missing indexes, and bloated tables can delay every page load. |
| Network | Distance, packet loss, routing, and peering can affect global response time. |
Server-level best practices
- Use HTTP/2 or HTTP/3 where supported and stable.
- Enable TLS 1.2 and TLS 1.3 with a valid certificate.
- Use Brotli or gzip compression for text assets.
- Enable OPcache for PHP applications.
- Keep the operating system, web server, PHP, database server, and application dependencies updated.
- Review access logs for bots, abusive traffic, broken URLs, and expensive endpoints.
- Monitor CPU, memory, disk I/O, network, PHP-FPM, and database health.
DNS and TLS performance
DNS and TLS usually happen before the main page loads. Slow DNS or misconfigured TLS can add delay before the server even begins returning content.
- Use a reliable DNS provider with globally distributed nameservers.
- Avoid unnecessary DNS indirection and long CNAME chains.
- Keep SSL/TLS certificates valid and chains complete.
- Use TLS 1.3 where supported.
- Enable OCSP stapling where appropriate and supported by the web server.
- Monitor certificate expiration and HTTPS validation failures.
Third-party scripts and external dependencies
Third-party scripts can be useful, but they often become one of the largest performance risks on a page. Analytics, ads, chat widgets, social embeds, maps, tag managers, A/B testing platforms, payment widgets, and tracking pixels can all add network requests and JavaScript execution time.
Third-party script recommendations
- Load only the scripts you actually use.
- Remove old tracking pixels and unused marketing tags.
- Defer noncritical third-party scripts.
- Load chat, map, or video widgets only after user interaction when possible.
- Review tag manager containers regularly.
- Monitor third-party outages because external dependencies can make your site feel slow even when your server is healthy.
Mobile performance
Mobile users often have slower CPUs, smaller screens, and less reliable networks than desktop users. A page that feels instant on a developer workstation can be slow on a mid-range phone over a congested mobile connection.
- Test on mobile profiles, not only desktop broadband.
- Reduce JavaScript execution and main-thread blocking.
- Use responsive images with appropriate sizes.
- Avoid large layout shifts on small screens.
- Minimize popups, heavy animations, and above-the-fold third-party widgets.
Performance monitoring with Spark Uptime
Performance testing tools are useful for audits, but continuous monitoring is what shows whether performance remains stable over time. Spark Uptime monitors can help track response time, availability, regional behavior, and outage signals so you can identify when performance changes after deployments, traffic spikes, DNS changes, hosting issues, or CDN configuration updates.
Useful performance signals to monitor
- Average response time over time.
- Response time by region or monitoring location.
- Slowdowns before incidents.
- Timeouts, 5xx errors, DNS failures, and TLS failures.
- Changes after deployments, plugin updates, theme changes, CDN changes, and DNS migrations.
Website performance troubleshooting checklist
Measure first
Run PageSpeed Insights, GTmetrix, WebPageTest, and browser DevTools before changing anything. Save the baseline results.
Check server response
Review TTFB, hosting resource usage, PHP workers, database load, cache hit rate, and origin response time.
Fix large assets
Compress and resize oversized images, remove unused files, enable lazy loading, and use modern image formats.
Enable safe caching
Use page caching, object caching, browser caching, OPcache, and CDN caching where appropriate.
Reduce frontend weight
Remove unused JavaScript and CSS, defer noncritical scripts, and reduce third-party tags.
Optimize WordPress
Update WordPress, themes, and plugins; enable auto updates where appropriate; remove unused plugins; use caching; and keep the database healthy.
Use a CDN
Consider Cloudflare or another CDN to improve regional delivery and reduce origin load.
Monitor continuously
Track response time and availability over time so you can catch regressions before customers report them.
Common performance problems and fixes
| Symptom | Likely cause | Recommended action |
|---|---|---|
| High TTFB | Slow backend, no cache, overloaded hosting, slow database, remote API delay. | Enable page cache, optimize database, review hosting resources, profile backend code. |
| Slow first load but fast repeat load | Browser cache helps after first visit, but initial assets are heavy. | Reduce page weight, compress images, use CDN caching, remove unused CSS and JavaScript. |
| Fast locally but slow globally | Origin server is far from visitors or CDN is missing or misconfigured. | Use a CDN, test from multiple regions, review DNS and routing. |
| Good server timing but poor user experience | Heavy frontend JavaScript, layout shifts, render-blocking assets, or slow third-party scripts. | Audit Core Web Vitals, reduce JavaScript, defer scripts, optimize fonts and images. |
| WordPress gets slower over time | Plugin bloat, database bloat, outdated software, unoptimized images, or no object cache. | Update software, remove unused plugins, optimize database safely, enable caching. |
| Intermittent slowness | Traffic spikes, bot traffic, resource limits, cache purges, or third-party dependency delays. | Monitor resources, review logs, improve cache rules, add CDN or WAF protections. |
Standards and technical references
These external references are useful for deeper technical research into browser loading, HTTP, caching, TLS, and web performance behavior.
| Reference | Why it matters |
|---|---|
| Web Vitals | Explains Core Web Vitals and user-experience performance metrics. |
| MDN HTTP caching | Detailed explanation of browser and HTTP caching behavior. |
| RFC 9110 | HTTP semantics, including request and response behavior. |
| RFC 9111 | HTTP caching standard. |
| RFC 9112 | HTTP/1.1 standard. |
| RFC 9113 | HTTP/2 standard. |
| RFC 9114 | HTTP/3 standard. |
| RFC 8446 | TLS 1.3 standard. |