Wednesday, August 10, 2016

Difference between sp.js and sp.runtime.js

The difference between sp.js and sp.runtime.js is


  • SP.js includes the SharePoint object modal references, such as web, lists, client context (which is used for representing the context of SharePoint Objects and operations), etc. It provides the types and members similar to the server object model namespace Microsoft.SharePoint to work with top-level sites, sub-sites and their lists and libraries.

  • SP.Runtime.js includes the details between client and server communication. It contains the runtime object of JavaScript and encapsulate all classes of client object model and the server interaction.


When you use JSOM, import the following libraries in the specified order.

  1. ASP.NET Ajax library
  2. sp.runtime.js
  3. sp.js 

No comments:

Post a Comment