Blog
Jul 29, 2014 - 1 MIN READ
Loading custom scripts in Squarespace

Loading custom scripts in Squarespace

Fix Squarespace custom script loading issues. Developer tools, code injection, and workarounds for Squarespace Script Loader problems with custom JavaScript libraries.

My profile picture

Ryan Prater

Update June 2025: This post is now outdated. Squarespace has significantly changed how custom JavaScript works since 2014.

Current Methods for Adding JavaScript to Squarespace:

  1. Code Injection (Settings → Advanced → Code Injection)
    • Site-wide JavaScript in header or footer
    • Page-specific injection available
  2. Code Blocks (Add Block → Code)
    • HTML/JavaScript on specific pages
    • Requires Business plan or higher
  3. No More /scripts Directory
    • Squarespace removed the ability to upload custom files to a /scripts folder
    • The <squarespace:script> loader is deprecated

Modern Approach: For site-wide scripts, use Code Injection:

<script>
// Your custom JavaScript here
console.log('Custom script loaded');
</script>

For individual pages, just throw your code in a Code Block.

Squarespace killed off the whole Developer Tools thing and file uploads. Classic move - take away the useful stuff and make us use their way instead. At least Code Injection still works.

Copyright © 2025