3rd Party Hosting Webflow Sites & Files

Hosting Client-side JavaScript Code

Overview
What Does Webflow's Hosting Provide?
001
Hosting Sites
Hosting Sites
200
Exporting a Site
201
Reverse Proxy
202
Hosting Files
Hosting Files
600
Hosting Files on Google Drive
601
Hosting Files in Dropbox
602
Hosting Code
Hosting Client-side JavaScript Code
700
Hosting Editable Content & Data
Hosting Editable Content & Data
800
Hosting Data Using Google Sheets
801
Google Docs
Hosting Data Using Google Docs
850
In-Directly Embedding Content from Google Docs
851
Directly Embedding Formatted Content from Google Docs
852
Hosting on CDNs
Hosting Code on CDN
900
Dev & Build Process
901
No items found.
Published
August 11, 2023
Updated
August 11, 2023
in lightbox

Webflow support custom code in HTML Embed areas, as well as in page-level and site-level custom code areas.

However, these areas have a size limit, are difficult to access and inconvenient to develop in.

While there are some hacks such as uploading your JS as .txt files, none of these are really suitable for development work. It's well worth your time to invest in learning the real tools that will work for you.

Free JavaScript Hosting

If you want to host a JavaScript file for free, there are several reliable options available. In general you should think of this as two parts;

  • The code storage repository
  • The code delivery network ( a form of CDN )

Here are some of the best combinations;

  • GitHub + jsDelivr
  • GitHub + Netlify

Finsweet has a walkthrough of this process.

https://www.youtube.com/watch?v=GEodIxXdmnY&ab_channel=Finsweet

Understanding the Pieces

GitHub

Github has a built-in editor, full history, and excellent user control. To serve the content you have several options;

  1. GitHub Pages: If your JS file is part of a project, you can host it using GitHub Pages. It's primarily for static site hosting, but you can link to individual files, including JavaScript files.
  2. Raw GitHub Content: You can also link directly to the raw content of a JS file in a GitHub repository. However, the domain (raw.githubusercontent.com) does not send the correct content type for JS files by default, so it's not always suitable for direct inclusion as a script on other sites.
  3. jsDelivr ( see below )
  4. Netlify ( see below )

jsDelivr

A free public CDN that can serve files from npm packages or directly from GitHub repositories. It's optimized for loading speed and can be used to host and serve your JS files.

Netlify

With Netlify, you can drag and drop your project, and it will be hosted for free. It's great for hosting static sites, but you can also use it to serve individual JS files.

It can also be directly connected to a public Github repo, and auto-publish from it. Private repos are also available on a paid Netlify plan.

Vercel

Another platform similar to Netlify. Vercel provides hosting for static files and JS-based projects like those made with Next.js.

Glitch

Glitch allows you to write, share, and remix code for fun and practical purposes. You can host full web applications, but it's also feasible to serve individual JS files.

Firebase Hosting

Part of Google's Firebase suite of tools, Firebase Hosting offers free hosting for static assets, including JS files.

CDNJS ( by permission )

A community-driven CDN which hosts many popular JavaScript libraries and plugins. If your JS file is a library or tool that others might benefit from, you can request its inclusion on CDNJS.

Development-Time Hosting

During development, these are other great options which support an Interactive Development Environment ( IDE ). This allows you to code freely, and then immediately save and view the results in your Webflow site without having to update script in your site's custom code area.

However these options may not be entirely free.

Codepen.io

Offers a nice built in editor, and delivers any file type by CDN, however it has no history or ability to revert changes, and not designed for team use.

Codepen pro allows you to directly serve your JS and CSS files so that they can be referenced in your Webflow site.

Codesandbox

Similar to Codepen but a bit beefier on project management.

GitHub Codespaces

Codespaces is one of our favorite frameworks today. It involves a bit of knowledge and setup, however if you do real development on Webflow we consider it a non-negotiable part of the equation.

Videos
No items found.
Table of Contents
Comments
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.