Academy / Advanced Level: HTML and CSS
Web Performance Optimization
Caching and Content Delivery Networks (CDNs)
Caching stores parts of your website in a user's browser or server, so they don’t have to be reloaded every time the user visits the site. CDNs deliver content from servers located close to the user, reducing latency and improving load times.
Browser Caching:
Set caching headers for static resources like images, CSS, and JavaScript to reduce load times on repeat visits.
Cache-Control: max-age=31536000, public
Content Delivery Network (CDN):
A CDN distributes your website’s static assets (like CSS, JavaScript, and images) across multiple geographically distributed servers. When a user visits your site, the assets are delivered from the server closest to them, reducing latency and load time.
Popular CDNs:
- Cloudflare
- Amazon CloudFront
- Fastly
- Akamai