Loading JavaScript or CSS on Every Page in a Site using JSOM (UserCustomActions)

A common question in SharePoint forums is how do I load SuchAndSuch.js on every page in the site collection (ok, let’s be honest, it’s usually how to I load jQuery on every page). This is pretty easy to do using the SharePoint client object model and setting something called UserCustomActions. In this post, I’m going to build a utility page to do just that. It will be an ASPX page (really just a text file) that you can drop in any SharePoint document library and click on to start immediately configuring UserCustomActions at either the site or the web level. It has no dependencies. It is a self contained page with only HTML and pure JavaScript.

Continue reading “Loading JavaScript or CSS on Every Page in a Site using JSOM (UserCustomActions)”

Scroll to top