External Anchors should webflow use rel="noopener"

Hi all,

I tested my site with lighthouse and one of the free SEO tools. A warning came up about insecure links.

Opens External Anchors Using rel=“noopener”

edit: I see this link :point_up_2:: uses noopener

Should webflow links that open in new window use this rel attribute?

<a href="http://example.com" target="_blank" rel="noopener">

If you are convinced your _blank links should use this attribute, you can add it yourself using the Custom Attributes section of the Settings tab.

http://vincent.polenordstudio.fr/snap/vlrrx.jpg

http://vincent.polenordstudio.fr/snap/6tdf0.jpg

2 Likes

I’m not convinced of anything Vincent. I am more fishing for validation. Thanks for the instructions. I tested that out earlier:sunglasses::sunglasses:

I know the feeling :smiley: I’m interested by this one though, because I’m aware of the security issue with target="_blank"(Check here: About rel=noopener )

I never, ever, use target=_blank on a website. I use it on prototypes or intranets or web apps with determined users, but not on public websites. 2 reasons:

  1. the security reason we mentionned
  2. the fact that you shouldn’t manage users’ tabs. If they want to open one, they can, if they want to open links on a new one, they can decide to open it in new tab but stay incactive, they can decide to open it in incognito window… They can always do what they want, setup their browsers how they want, and do things for themselves better than what you’d do. If they want to go back in their browsing history, they can. For instance it’s far easier to go back in history on mobile than to have to swap to a different page. (the UX here is prettty horrendous, you have to face a list or a grid or a 3D flow of all the pages you browser remembers, the cognitive hit is severe.)

In short, opening tabs is what malicious, piracy and porn sites do. If your site is an app, with a secure and heavy login and session, maybe you can consider it, but you run into problem #1. Which your custom attribute seems to solve.

I will take this approach too. No more blanks … or porn sites

2 Likes

It would still be useful to have an option to automate the attribute for this, for those of us who do use “_blank”, as it’s not an uncommon user pattern and often expected behaviour. It’s something Wordpress have implemented for external links.

@alexdixon Why not just set your default on internal links via JS when not set?

As to the original post. There is no user generated content on a webflow site. You are either a designer or an editor. Therefore a trusted user. You can solve the addition or removal of attributes on a link the same way of you want as designer (custom code access). JQuery is already loaded. One line of code addresses this.