Skip to main content
SaaS|Frontend Developer / Performance Engineer

Website Speed & Performance Optimization

Analyze compression, caching, protocols, and page weight for faster load times

Every 100ms of latency costs conversions. EdgeDNS lets you audit compression support, cache configuration, HTTP protocol versions, resource hints, redirect chains, and page weight — giving you the data to eliminate performance bottlenecks before users notice them.

The Challenge

Performance regressions creep in silently — a deploy disables Brotli compression, a CDN change drops cache headers, a redirect chain adds 300ms of latency. Without continuous monitoring, these issues compound until users leave and Core Web Vitals fail.

The Solution

Use EdgeDNS performance APIs to continuously verify compression support, cache header configuration, HTTP/2 and HTTP/3 availability, resource hints, redirect chains, and total page weight. Integrate checks into your CI/CD pipeline to catch regressions before they reach production.

Endpoints Used

Combine these EdgeDNS endpoints to build this solution.

GET
/v1/domain/compressionTry in Playground

Compression Check: Verify gzip, Brotli, and zstd support with compression ratios

GET
/v1/domain/cacheTry in Playground

Cache Headers: Analyze Cache-Control, ETag, and CDN caching configuration

GET
/v1/domain/http-versionTry in Playground

HTTP Version: Check HTTP/2 and HTTP/3 (QUIC) protocol support

GET
/v1/domain/resource-hintsTry in Playground

Resource Hints: Discover preconnect, prefetch, preload, and dns-prefetch hints

GET
/v1/domain/redirectTry in Playground

Redirect Chain: Trace redirect hops, detect loops, and measure chain latency

GET
/v1/domain/page-weightTry in Playground

Page Weight: Analyze total page size and resource breakdown with load time estimates

Results You Can Achieve

Identify the biggest opportunities to improve load times

Identify missing compression, suboptimal caching, and bloated resources that slow down your site

Catch performance regressions in CI/CD

Automate compression, caching, and protocol checks before deployment to prevent regressions from reaching users

Optimize for every connection speed

Page weight analysis with estimated load times on 3G, 4G, and broadband helps you hit performance budgets for all users

Code Example

Run a performance audit in CI/CD

javascript
const domain = 'staging.example.com';
const headers = { 'Authorization': 'Bearer YOUR_API_KEY' };

const [compression, cache, httpVersion, pageWeight] = await Promise.all([
  fetch(`https://api.edgedns.dev/v1/domain/compression?domain=${domain}`, { headers }),
  fetch(`https://api.edgedns.dev/v1/domain/cache?domain=${domain}`, { headers }),
  fetch(`https://api.edgedns.dev/v1/domain/http-version?domain=${domain}`, { headers }),
  fetch(`https://api.edgedns.dev/v1/domain/page-weight?domain=${domain}`, { headers }),
].map(p => p.then(r => r.json())));

const issues = [];
if (!compression.data.isCompressed) issues.push('Compression disabled');
if (!cache.data.isCacheable) issues.push('Response not cacheable');
if (!httpVersion.data.http2) issues.push('HTTP/2 not supported');
if (pageWeight.data.totalSizeBytes > 2_000_000) issues.push('Page exceeds 2MB budget');

if (issues.length > 0) {
  console.error('Performance gate FAILED:', issues);
  process.exit(1);
}
console.log('Performance gate PASSED');

Learn More

Explore industry standards and best practices related to this use case.

Ready to build Website Speed & Performance Optimization?

Get started with 200 free API requests per month. No credit card required.

Other Use Cases