Beware when you use target="_blank" next time

Setting target attribute of anchor tag to '_blank' is quite common when you want to open the link in a new tab of the browser. What is not commonly understood is this can lead to a vulnerability known as tabnabbing.

You can easily avoid this potential vulnerability by adding a rel attribute to anchor tag and setting it to "noreferrer noopener"

So next time you write a code which looks like <a href="https://www.greyneuronconsulting.com" target="_blank">Grey Neurons consulting</a> take an extra moment and don't forget to add the rel attribute <a href="https://www.greyneuronconsulting.com" target="_blank" rel="noopener noreferrer"> Grey Neurons consulting</a>
HTML Software Engineering cyber security Tips


Clicky