Pros and Cons: Script Editor Web Part, Content Editor Web Part

In customizing SharePoint pages, you must first determine which type of page do you want to create and customize to be able to assess which tool you should use. For this topic, we are going to make use of the web part page.

A web part page is made up of the default or customized regions of the page (e.g. header, side navigations, and columns and rows division) known as web part zones. In every zone, you can add SharePoint web parts. The web parts, which serve as the page’s building blocks, display data from the site you’re in.

From the list of SharePoint web parts, we are going to talk about the script editor web part and content editor web part as well as the advantages and disadvantages of using the two.

Script Editor Web Part

A script editor web part allows users to directly insert script snippets inside a web part page in SharePoint 2013, SharePoint 2016, and SharePoint Online. Most of the time, a script editor web part is convenient and easy. Some developers find it bothersome.

The good thing about script editor web part is that it can directly add minor page behavior, give access to page snippets, and provide quicker page load time.

Advantages

Directly Adds Minor Page Behavior

For SharePoint newbies, customizing a SharePoint page to one’s liking needs a lot more effort than just the usual HTML, JavaScript, and CSS snippets. SharePoint has default functions for its pages where data are processed and viewed; however, default views and functions are often limited. Other users prefer otherwise. As a quick solution, we often add script editors to contain small scripts to tweak some default web part page properties.

Access of the Page Snippets (Small Number)

If you’re working within a team, there will always come a time when you need to continue working on a teammate’s task. Having the scripts on the same page allows you to easily manage your other team member’s solution.

Faster Page Load Time

Scripts that are directly embedded on the page are processed first on page load without searching for external files on the site, allowing a faster page load for the scripts and saving more time in loading the page contents.

Disadvantage

Script Management

While script editor web part is convenient for small tweaks on the page, having a lot of them can cause a problem on script management.

One concern that usually arises is that developers may have a hard time managing a page when there are too many script editors. For example, when a developer labels script editor web parts as SE 1 (for navigation), SE 2 (for a custom web part), and SE 3 (for behaviors), there are chances that developers forget which web part handles which. When this happens, developers need to do a manual trace on each script editor web part. Tracing script web parts can also be difficult for a developer who just joined the team.

There are also scripts that do the same function. Having the page do it repeatedly at the same time may waste resources when it can be utilized.

Content Editor Web Part

You can use content editor web part in SharePoint Online, SharePoint Online admin center, SharePoint Online operated by 21Vianet, and Windows SharePoint Services 3.0. Content editor web part is used to add formatted text, tables, hyperlinks (when you add HTML content), and photos to a classic web part page only; this functionality is not available in the modern pages.

Also, you can take advantage of content editor web part to add an introductory and formatted paragraph to a page, table of instructions for charts, and hyperlinks to more information.

While content web part editor is another means for adding custom page contents, it only works externally. The script snippets for the page is stored as a file in one directory (document library) on SharePoint and is accessed through the web part.

Advantage

Script Management

One of the top features of content editor web part is that it can manage scripts. Content editor web part provides a more extensive customization and optimized version of a SharePoint page.

Having the scripts stored into a file inside a document library and being called on the web part gives a more centralized use of the scripts on cases where the same function is used on other pages or similar functions across the page with little to no difference.

Document libraries contain feature for document versioning where control over the files will be monitored, which provides an easier solution management within the team.

Disadvantage

Access to Files

The implications of accessing files are both a case for the page and the user. Content editor allows the page to access external files. Accessing might take a longer time as it will search for the set directory of the specific file.

At times, the files are transferred and doing such without proper knowledge of all its other uses may cause them to fail, creating a chained error across the site that slows page load time. To manage a page with content editors, the user needs to know the right directories of the files.

When you are new to the page and its solutions, it might be a bit bothersome to check the web parts’ individual properties to know where its external files are located. Take note that there are times when a user isn’t given access to modify files on a certain level of the site.

Add a Comment

Your email address will not be published. Required fields are marked *