osompress / simple-social-icons

Plugin: Simple Social Icons
62 stars 33 forks source link

Consider adding rel=noopener if links are opened in a new window #78

Closed nickcernis closed 5 years ago

nickcernis commented 6 years ago

From @davidcolen in a comment on separate pull request at https://github.com/studiopress/simple-social-icons/pull/77.

I feel it would also be good if we could have "noopener" included as well on the rel if the setting is to open the links in a new window.

This is for a number of reasons...

the new page runs on the same process as your page so If the new page is executing expensive / large javascript calls potentially the calling page's performance will also be impacted...

opening links (with target="_blank") is also a security vulnerability as the new page has access to your window object via window.opener.

This would also potentially give an uplift from a Google perspective as it's one of their best practices for improving quality in a site.

I agree that this would be worthwhile if people have ticked, “open links in new window” for the widget.

Reference: https://developers.google.com/web/tools/lighthouse/audits/noopener

JiveDig commented 5 years ago

To stay organized, this looks like another request https://github.com/studiopress/simple-social-icons/issues/71

nickcernis commented 5 years ago

Thanks, @JiveDig. Closing this in favour of that one.