The CDN concept in SharePoint
By Anatoly Mironov
How many instances of jquery are there in your SharePoint farm? [sourcecode language=“powershell”] Get-SPWebApplication http://dev ` | Select -Expand Sites ` | Select -Expand AllWebs ` | Select -Expand Lists ` | Select -Expand Items ` | ? { $_.Url -match “jquery.*.js” } ` | select Name, Url [/sourcecode] Have you more than two (jquery and jquery-ui), then you have too much. You can save much place and performance by using Content Delivery Network (CDN) links for the resources like javascript, css, fonts and icons. Consider those Content Delivery Networks:
CDN for custom resources
But can we benefit from this CDN concept for our custom resources? I think so, if your farm has ten thousands of site collections, and you deploy javascript files, css files in the Style Library, it would be great to eliminate resource duplicates. So my thougt is to deploy resources to one place. It could be:
- An external web application static.contoso.com like many web applications do
- A dedicated site collection for resources cdn.contoso.com with Anonymous access
The CDN concept in Office 365
Have you noticed that Office 365 uses cdn links for almost all SharePoint javascript files that traditionaly were referenced from the _layouts folder With this I want to raise a question. What do you think about the CDN concept within SharePoint? Have you used it? Have you plans to have it?
Comments from Wordpress.com
Minimal Download Strategy. Simple - Bool Tech - Apr 3, 2016
[…] load. I would need more time to find out why. The good news is: it is an argument for using more CDN solutions in […]
Thanks for the codes, they are useful!
[…] load. I would need more time to find out why. The good news is: it is an argument for using more CDN solutions in […]
[…] In the whole intranet, we have only one jQuery url and only one our intranet.core.js url. We did by creating a dedicated CDN site collection. This alone makes a big difference. To evolve the idea we could provision resources outside […]
[…] Add a ScriptBlock instead of ScriptSrc. In that way you can reference javascript and css files outside you site collection – ultimately from a CDN site. […]
- cdn
- javascript
- office365
- Performance
- PowerShell
- sharepoint
- sharepoint 2013
- sharepoint online
- Uncategorized