Turn off the Minimum Download Strategy feature in CSOM

I have found that the Minimum Download Strategy can cause issues with some of the JavaScript/JQuery I used in some of my pages – particularly when using Display Templates. I’m not the only person to have problems with it, either. Well, here’s the CSOM to turn it off:

private static void RemoveMinimalDownload(ClientContext clientContext, Web web)
{
 Guid MDSfeature = new Guid("87294C72-F260-42f3-A41B-981A2FFCE37A");
 FeatureCollection features = web.Features;
 clientContext.Load(features);
 clientContext.ExecuteQuery();
 features.Remove(MDSfeature, true);
 clientContext.ExecuteQuery();
}
Advertisement
Turn off the Minimum Download Strategy feature in CSOM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.