← Back to all Resources

Using an iframe on the page

Accessibility
Performance
Custom code
Security

Ideally the iframe content/functionality would be built in Webflow. But if you can't do that and need it to be an iframe, then it should be loaded in the following way:

  • Using a facade to prevent the iframe from loading immediately, blocking the page from rendering. Then after the page is done rendering, the facade (could be an image, loader, etc) can be replaced with the iframe. This method requires custom code.
  • Assign dimensions to the iframe to ensure there is no page movement/layout shifts when inserting the iframe after page load
  • If the iframe is not above the fold, consider lazy loading it or use the same facade approach mentioned above but load it when scrolled into view
  • Ensure content in the iframe is optimized. It's possible for content within to slow things down and affect the user experience i.e., nested iframes

Accessibility considerations:

  • Use the title attribute on the iframe for users on assistive devices. More on attributes for accessibility with iframes here.
  • Ensure content in the iframe is accessible i.e., semantic html, relevant aria labels, alt text for images, etc. Consider using other attributes that are relevant
  • Consider providing a link to the iframe in the event it is not accessible.
  • Ensure keyboard focus can move in/out of the iframe.
  • Ensure mobile responsiveness and try to match with native website for a smoother user experience.
  • Explore usage of the sandbox attribute for security.

Related resources

Retrieving UTM Parameters and Adding Hidden Inputs to Forms

Captures UTM parameters as hidden form inputs for campaign tracking via form submissions.
Developer
Video
Custom code
Forms
Marketing

Saving and Retrieving User Input with Local Storage

How to save and retrieve user input on a form from/to local storage and show it on a thank you page.
Developer
Video
Custom code
Forms
Marketing

Splitting your Webflow site into multiple projects

Considerations when splitting or separating a single Webflow site into two projects
Designer
Article
DNS
Hosting
Migration
SEO
Security

Domain migration

Safeguard the user experience, functionality, and security of your website during a domain migation.
Developer
Article
DNS
Hosting
Migration
SEO
Security

Creating your own middleware

A guide to creating middleware to protect your API keys when making front-end calls in Webflow
Developer
Github
Custom code
API

Single sign-on (SSO) for site visitors

Implement single sign-on (SSO) for your site visitors to protect content or create a logged-in experience on your site
Developer
Article
Single Sign On (SSO)
Security
User memberships

Dialog element for modals and popups

Build more accessible pop up elements by using the dialog element with custom elements in Webflow
Developer
Nugget
Accessibility
Custom code

Webflow WAF vs Imperva

An overview of the Webflow web application firewall (WAF) and how it compares with Imperva
Developer
Nugget
Hosting
Security

Custom code workflows

Methods for working with custom code in Webflow
Developer
Article
Custom code

Image resets in Webflow

Adding explicit width and height values to avoid performance issues related to images
Designer
Nugget
Performance
Optimization