Minimum Download Strategy was a new feature introduced in SharePoint 2013 to improve the page rendering performance by downloading only the content, which has changed between the current page and the requested page. By default, MDS is enabled in the site, which can be verified by going to the site features.
MDS uses a single file (start.aspx) present in the layouts folder for all the pages. The actual URL will be encoded , following the hash mark in the URL, as shown below-
/_layouts/15/start.aspx#/Shared%20Documents/Forms/AllItems.aspx
Thus, one can say, when moving from the home page to the shared documents, only the changes in the content between the two pages will be downloaded.
However MDS can cause problems in some scenarios, where the customization has been applied through JS Link. Thus, I had to disable MDS across the sites to get the JSLink customization working. We can do it, using PowerShell Spin up SharePoint 2016 Management Shell.
Run the code, given below, which will loop through the sites and disable MDS feature.
- $SPWebApplication = Get-SPWebApplication -Identity "http://SharePoint2016"
- $SPSiteCollection =$SPWebApplication | Get-SPSite -limit all
-
- foreach ($SPSite in $SPSiteCollection)
- {
- $SPWebs = $SPSite | Get-SPweb -limit all
- foreach ($SPWeb in $SPWebs)
- {
- Disable-SPFeature -Identity "87294c72-f260-42f3-a41b-981a2ffce37a" -url $SPWeb.URL -Confirm:$False
- }
- }
Heading over to the features page, we can verify that the MDS feature has been disabled.
Summary - Thus, we saw how to disable Minimum Download Strategy across the sites in SharePoint Server 2016.