Course contentsShow
← Web Development
Lesson 2158 of 2,98239. Network PerformanceFree lesson

Types of Assets to Serve from CDNs

Identify which assets benefit most from CDN delivery: static files, images, fonts, JavaScript, CSS, and video content.

Types of Assets to Serve from CDNs

You'll learn which types of assets gain the most from CDN delivery and why.

Understanding Asset Categories

Now that you know CDNs boost performance through geographic distribution and caching, you need to know what to put on them. Not all assets benefit equally.

Think of a CDN like a chain of bookstores across the country. You wouldn't stock every item everywhere—you'd focus on popular, unchanging items that people want immediately. The same logic applies to web assets.

Ideal Assets for CDN Delivery

Static files are perfect CDN candidates. These files don't change based on user identity or session state, making them easy to cache globally.

Images (PNG, JPEG, WebP, SVG) benefit enormously. They're often the largest assets on your page and are identical for all users. A product photo served from a nearby CDN edge can load 5-10x faster than from your origin server.

Fonts (WOFF, WOFF2) should almost always live on CDNs. They're static, reusable across your entire site, and blocking resources that affect text rendering.

JavaScript libraries and bundles are prime CDN targets—especially vendor code that rarely changes. Your vendor.js bundle can be cached worldwide for months.

CSS files work identically for all users and benefit from edge caching and geographic proximity.

Video content sees massive improvements. Streaming video from geographically distributed servers reduces buffering and improves playback quality. Many CDNs offer specialized video delivery features.

What to Avoid

Personalized content, user-specific data, and frequently changing dynamic responses typically shouldn't go on CDNs (or need special cache strategies you'll learn later).

Key Takeaway: Serve static, reusable assets—images, fonts, JavaScript, CSS, and video—from CDNs to maximize performance gains through global caching and geographic distribution.