target="_blank" and window.open keep the window.opener reference towards parent/source site. Thus it opens the possibility of phishing attack.
Therefore we should use in HTML : rel="noopener noreferrer"
and in Javascript:
For details: here
Source: here
Therefore we should use in HTML : rel="noopener noreferrer"
and in Javascript:
const newWindow = window.open('https://gosink.in');
newWindow.opener = null;
For details: here
Source: here
No comments :
Post a Comment