Office 365 Content Delivery Network (CDN) Quickstart
You can use the built-in Office 365 Content Delivery Network (CDN) to host static assets (images, JavaScript, Style sheets, WOFF files) to provide better performance for your SharePoint pages. The Office 365 CDN improves performance by caching static assets closer to the browsers requesting them, which helps to speed up downloads and reduce latency. Also, the Office 365 CDN uses the HTTP/2 protocol for improved compression and HTTP pipelining. The Office 365 CDN service is included as part of your SharePoint subscription.
For more detailed information, see Use the Office 365 Content Delivery Network (CDN) with SharePoint.
Note
The Office 365 CDN is only available to tenants in the production (worldwide) cloud. Tenants in the US Government, China and Germany clouds don't currently support the Office 365 CDN.
Use the Page Diagnostics for SharePoint tool to identify items not in CDN
You can use the Page Diagnostics for SharePoint tool browser extension to easily list assets in your SharePoint in Microsoft 365 pages that can be added to a CDN origin.
The Page Diagnostics for SharePoint tool is a browser extension for the new Microsoft Edge (https://www.microsoft.com/edge) and Chrome browsers that analyzes both SharePoint in Microsoft 365 modern portal and classic publishing site pages. The tool provides a report for each analyzed page showing how the page performs against a defined set of performance criteria. To install and learn about the Page Diagnostics for SharePoint tool, visit Use the Page Diagnostics tool for SharePoint.
When you run the Page Diagnostics for SharePoint tool on a SharePoint in Microsoft 365 page, you can select the Diagnostic Tests tab to see a list of assets not being hosted by the CDN. These assets are listed under the heading Content Delivery Network (CDN) check as shown in the screenshot following.
Note
The Page Diagnostics tool only works for SharePoint in Microsoft 365, and can't be used on a SharePoint system page.
CDN Overview
The Office 365 CDN is designed to optimize performance for users by distributing frequently accessed objects like images and JavaScript files over a high-speed global network, reducing page load time and providing access to hosted objects as close as possible to the user. The CDN fetches your assets from a location called an origin. An origin can be a SharePoint site, document library, or folder that is accessible by a URL.
The Office 365 CDN supports:
- Public CDN, which is designed to be used for JS (JavaScript), CSS (Style Sheets), Web Font File (WOFF, WOFF2) and non-proprietary images like company logos.
You can choose public origins for your organization Choose public origins.
How to enable Public CDN with the default configuration
Before you make changes to the tenant CDN settings, you should verify that it meets compliance, security and privacy policies of your organization.
For more detailed configuration settings, or if you have already enabled CDN and want to add additional locations (origins), see the section Set up and configure the Office 365 CDN by using the SharePoint Management Shell
Connect to your tenant using the SharePoint Management Shell:
Connect-SPOService -Url https://<YourTenantName>-admin.sharepoint.com
To enable your organization to use public origin with the default configuration, type the following command:
Set-SPOTenantCdnEnabled -CdnType Public -Enable $true
See also
Use the Page Diagnostics tool for SharePoint
Use the Office 365 Content Delivery Network (CDN) with SharePoint