Should Webflow links that open in a new window use the rel attribute "noopener"?

Published on
September 22, 2023

When it comes to links that open in a new window in Webflow, it is recommended to use the rel attribute with the value "noopener". The rel attribute is utilized to specify the relationship between the current web document and the linked document. The "noopener" attribute is specifically used to address a security vulnerability known as "reverse tabnabbing".

Reverse tabnabbing occurs when a malicious website, opened in a new tab or window, can potentially manipulate the window.opener property of the originating page to redirect the user to another malicious page, tricking them into revealing sensitive information or performing unintended actions. By using the rel attribute with the value "noopener", the window.opener property is set to null, preventing the malicious website from accessing the originating page.

To add the rel attribute with the value "noopener" to your link in Webflow, follow these steps:

  1. Select the element containing the link you want to modify.
  2. In the right sidebar panel, click on the "Settings" tab (looks like a gear icon).
  3. Scroll down to the "Attributes" section.
  4. Click the "+" button to add a new attribute.
  5. Set the attribute name to "rel".
  6. Set the attribute value to "noopener".
  7. Click outside the input field to save the attribute.

By following these steps, you are ensuring that links in Webflow that open in a new window have the proper rel attribute set to "noopener", providing an additional layer of security for your users.

Additional Considerations:

  • When using the rel attribute with "noopener", it is also recommended to include the attribute "noreferrer" for further protection. This prevents the referrer header from being sent when the new window or tab is opened.

  • If you have multiple links that require the "noopener" attribute, or want to apply it site-wide, you can use Webflow's global attributes feature. This allows you to add custom attributes to multiple elements at once, saving you time and effort.

Example Syntax:

<a href="https://example.com" target="_blank" rel="noopener">Link Text</a>

Optimized Questions:

  1. Why should Webflow links that open in a new window include the "rel" attribute "noopener"?
  2. How can I add the "rel" attribute "noopener" to Webflow links that open in a new window?
  3. What is reverse tabnabbing and how does using the "rel" attribute "noopener" prevent it in Webflow?