Adding JavaScript and cascading stylesheet references to a master page

Most of our customizations to the master pages require some CSS or JavaScript (JS) references. CSS and JS files should be located in one of the following places:

  • In the SharePoint site inside the _catalogs/masterpage folder. This allows for the files to be included when exporting a design package.
  • In the _layouts folder on the filesystems of the SharePoint servers. This is primarily accomplished with custom SharePoint solutions created with Visual Studio.
  • On an external content source, such as a content delivery network.

Note

If you are using an external content source, ensure that all users accessing the SharePoint site have access to the external content source. The external content ...

Get SharePoint 2013 WCM Advanced Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.