Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.18k stars 517 forks source link

Link: automatically add rel tag #5576

Closed stsrki closed 1 week ago

stsrki commented 2 weeks ago

Closes #5565

ChatGPT explained it better

When setting the Target attribute of a link to _blank in the Blazorise Link component, it is crucial to include the rel attribute to prevent potential security risks and improve SEO. The options provided are:

Here's an analysis of each option:

Option 1: rel="nofollow noreferrer"

Option 2: rel="noopener noreferrer nofollow"

Option 3: rel="noopener noreferrer"

Recommendation

The best option to use in the Blazorise Link component when the Target is set to _blank is:

Reasoning:

By using rel="noopener noreferrer", you ensure a secure and privacy-conscious implementation without unnecessarily impacting SEO. If there is a specific requirement for nofollow, it can be added as needed on a case-by-case basis.

stsrki commented 1 week ago

LGTM, could this produce a breaking change in any way?

Nothing breaking. This will prevent any security risks by giving the browser some extra hints. The user is not affected by it.