You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: microsoft-365/enterprise/use-microsoft-365-cdn-with-spo.md
+23-3Lines changed: 23 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -369,6 +369,16 @@ For more information about this cmdlet, see [Set-SPOTenantCdnEnabled](/powershel
369
369
370
370
<aname="CDNSetupinPnPPosh"> </a>
371
371
372
+
<aname="CDNSetupinPnPPosh"> </a>
373
+
374
+
<aname="CDNSetupinPnPPosh"> </a>
375
+
376
+
<aname="CDNSetupinPnPPosh"> </a>
377
+
378
+
<aname="CDNSetupinPnPPosh"> </a>
379
+
380
+
<aname="CDNSetupinPnPPosh"> </a>
381
+
372
382
## Set up and configure the Office 365 CDN by using PnP PowerShell
373
383
374
384
The procedures in this section require you to use PnP PowerShell to connect to SharePoint Online. For instructions, see [Getting started with PnP PowerShell](https://github.com/SharePoint/PnP-PowerShell#getting-started).
@@ -649,6 +659,16 @@ For more information about this cmdlet, see [Set-PnPTenantCdnEnabled](https://pn
649
659
650
660
<aname="CDNSetupinCLI"> </a>
651
661
662
+
<aname="CDNSetupinCLI"> </a>
663
+
664
+
<aname="CDNSetupinCLI"> </a>
665
+
666
+
<aname="CDNSetupinCLI"> </a>
667
+
668
+
<aname="CDNSetupinCLI"> </a>
669
+
670
+
<aname="CDNSetupinCLI"> </a>
671
+
652
672
## Set up and configure the Office 365 CDN using the CLI for Microsoft 365
653
673
654
674
The procedures in this section require the [CLI for Microsoft 365](https://aka.ms/cli-m365). Then, connect to your Office 365 tenant using the [login](https://pnp.github.io/cli-microsoft365/cmd/login/) command.
@@ -826,17 +846,17 @@ If the _Publishing_ feature isn't enabled for a public origin, or the asset isn'
826
846
For public CDN assets, the URL format looks like the following example:
> Use the page context property to construct the prefix instead of hard coding `https://publiccdn.sharepointonline.com`, because the URL is subject to change. If you use display templates with Classic SharePoint Online, you can use the property `window._spPageContextInfo.publicCdnBaseUrl` in your display template for the prefix of the URL. If you use SPFx web parts for modern and classic SharePoint, you can use the property `this.context.pageContext.legacyPageContext.publicCdnBaseUrl`, which also provides the prefix. If the prefix changes, your implementation is updated with it.
859
+
> Use the page context property to construct the prefix instead of hard coding `https://public-cdn.sharepointonline.com`, because the URL is subject to change. If you use display templates with Classic SharePoint Online, you can use the property `window._spPageContextInfo.publicCdnBaseUrl` in your display template for the prefix of the URL. If you use SPFx web parts for modern and classic SharePoint, you can use the property `this.context.pageContext.legacyPageContext.publicCdnBaseUrl`, which also provides the prefix. If the prefix changes, your implementation is updated with it.
840
860
>
841
861
> As an example for SPFx, you can construct the URL using the property `this.context.pageContext.legacyPageContext.publicCdnBaseUrl` - `/` - `host` - `/` - `relativeURL for the item`. For more information, see the video [Using CDN in Client-side code](https://youtu.be/IH1RbQlbhIA), which is part of the [season 1 performance series](https://aka.ms/sppnp-perfvideos).
0 commit comments