Webflow sync, pageviews & more.
NEW

What are the ramifications of removing these from the HTML tag in Webflow? Can I remove them if I'm using my own server for form submissions?

TL;DR
  • data-wf-site and data-wf-page are essential for Webflow.js to run site-wide and page-specific interactions and components.
  • Remove them only if you're not using Webflow.js, have replaced all interactions with custom code, and your site doesn’t rely on Webflow-specific scripts.

You're referring to the attributes added to the <html> tag in Webflow, such as data-wf-page and data-wf-site. These are automatically inserted by Webflow and serve specific purposes crucial to Webflow's core functionality. Here's a breakdown of the consequences of removing them if you're self-hosting or managing form submissions via your own server.

1. Purpose of data-wf-page and data-wf-site Attributes

  • data-wf-site: This identifies your Webflow project/site. It enables Webflow scripts (like Webflow.js) to initialize the required site-wide scripts and animations.
  • data-wf-page: This identifies the specific page within the project. It helps Webflow apply page-specific animations and interactions.

2. Impact of Removing These Attributes

  • Webflow Interactions Will Break: Any animations, page-load triggers, or scroll interactions built in Webflow’s Designer won’t function as expected because Webflow.js relies on these attributes to know which scripts to run.
  • Webflow Components May Malfunction: Components like sliders, tabs, dropdowns, and even the navbar could stop working, especially if they rely on Webflow.js initialization.
  • CMS Data May Not Behave Properly: If you export CMS pages, their dynamic behaviors might also experience inconsistencies.

3. Relevance When Using Your Own Server

  • Custom Form Handling Doesn't Require Webflow Scripts: If you've exported your site from Webflow and are managing form submissions independently (e.g., via your own back-end or third-party service), then form functionality is unaffected by these attributes being removed.
  • However, Client-Side Behaviors Still Depend on Webflow.js: Regardless of custom servers, if you’re still using any interaction built in Webflow (e.g., animations on scroll), then you should not remove these attributes.

4. When It's Safe to Remove Them

  • You’ve recreated all interactions/custom behaviors manually (via custom JS outside of Webflow).
  • You're not using Webflow.js in your exported code.
  • Your site is fully static and has no dependence on Webflow-specific scripts.

If these conditions are met, you can safely remove data-wf-site and data-wf-page.

Summary

You can remove data-wf-page and data-wf-site if you're fully self-hosting, handling form submissions on your own, and not using any Webflow interactions or components reliant on Webflow.js. Otherwise, removing them will break animations and interactive features built in Webflow.

Rate this answer

Other Webflow Questions