What Does Scripts/Embedded Code Disabled Mean in Squarespace?

Scripts disabled message
Embed code blocked message

Whenever you add custom JavaScript code to your website via code snippets or third-party plugins, the added code can sometimes conflict with the editing capabilities of the platform. In order to prevent issues like this from happening, Squarespace provides the option to Disable and Enable added scripts while you are editing your site.

The “Scripts have been disabled” message in Squarespace edit/preview mode means that all custom JavaScript code on your site will not be executed while you are editing or previewing page content. This allows Squarespace users to edit content in the page editor without running into issues that may be caused by additional JavaScript code.

What is the purpose of disabling scripts?

Disabling scripts in edit and preview mode ensures that no custom JavaScript code will interfere with your being able to edit page content.

If you’ve ever added custom JavaScript code to your site via a code snippet or a third-party Squarespace plugin, it probably looked and functioned just fine on the published version of your website, but you might have encountered issues with editing page content. For instance, maybe you tried to add a page section or a Squarespace element, but couldn’t figure out why the blue “Add +” button was not doing anything when clicked as expected, or maybe you tried to click and drag something to reorder the elements on the page, but it seems like the mouse just won’t let you access the element for some reason.

More than likely, strange issues like this are caused by external code/plugins that interfere with the native functionality of the Squarespace editor.

To avoid issues like this from happening in preview mode, Squarespace gives us the option to “Disable” all third-party scripts while editing the page. This means that any added scripts (code that is added to your site via a <script> tag) will not be executed in edit/preview mode, and therefore cannot cause any editing conflicts.

Disabling scripts in preview mode will not affect your published site, so there’s no need to worry about messing up your live site with these actions. The “Disable” and “Enable” scripts functionality is strictly for you, the Squarespace user, to have a smooth editing experience, in spite of the additional code.

What causes some custom code to interfere with the Squarespace editing platform?

The source of conflicts in preview mode is usually advanced JavaScript code snippets or plugins that add any kind of interactions to your site, such as a click event or a keypress event, or any code that modifies the DOM in some way.

Although this happens with some code snippets, the conflicts are usually preventable if the added code is well-written. In fact, Squarespace helps developers out by giving us ways of detecting in the code if the current preview is “edit” mode or “preview” mode so that we can disable interactive events if the current mode is in edit mode.

For a variety of Squarespace 7.1 plugins that are guaranteed to not cause any conflicts while you’re in edit mode, check out my plugin store.

How to disable and enable scripts in Squarespace edit mode

First, make sure you are logged into your Squarespace account.

Once you are logged in, you can disable scripts in edit and preview mode by adding “/safe” to the end of your Squarespace preview URL, which is your built-in domain plus “/config”. This will prompt scripts to automatically be disabled while you are previewing and editing page content. It should look something like this:

https://duck-lily-8h2g.squarespace.com/config/safe

You can find your built-in domain by navigating to Settings > Domains > Built-in Domain, or you can just look in the search bar of your browser while logged into your Squarespace website (see picture below).

Squarespace built-in domain

Look in the browser search bar while you are logged into your Squarespace site to find your preview URL. This is what you will append “/safe” onto.

You’ll know scripts have been disabled because a message that says “Scripts have been disabled on your site preview.” will show up at the bottom of the page. To the right of that message, you should see a blue button that reads “Enable Scripts in Preview,” which will enable the scripts again once you are finished editing.

Disabled scripts message in Squarespace

When scripts are disabled, a disabled scripts message will appear at the bottom of the screen in edit mode.

For more Squarespace tips, tricks, and tutorials, don’t forget to subscribe to my newsletter so that you’re never out of the loop.

Free Resources for Designers and Developers

DevTools Minicourse

Get in-depth training on how to use one of the most powerful tools in modern web development.

11-Step CSS Guide

Learn 11 simple ways to improve your custom CSS for cleaner, more understandable code.

Create a Free Product Comparison Table

Create free comparison tables for products, services, pricing packages, and more.

Caroline Smith

Caroline Smith is a solopreneur and front-end web developer with 5+ years of experience in web development.

https://launchhubstudio.com
Previous
Previous

A Complete Guide to CSS Selectors in Squarespace 7.1

Next
Next

How to Add Plugins to Squarespace Sites