SharePoint

SharePoint Online: JavaScript not Loading?

I ran into this issue a lot, solved it once, ran into the issue again, forgot the solution, and then found the solution again. I’m writing this blog post so I won’t forget next time.

Here’s the situation: you create a site page with some custom JavaScript referenced in a Content Editor Web Part (CEWP). It runs great. But then some time later it doesn’t run. You put the page in edit mode to check it out and see it runs in edit mode. Save the page and it doesn’t run. What is going on?

Well, it turns out it has to do with the Minimal Download Strategy (MDS). See Microsoft’s write-up here and some discussion on Stack here. It seems like there should be a way to manage this feature on a page-by-page basis.

For now, I’m disabling MDS via Settings -> Manage Site Features -> deactivate.  

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s