<Button target="_blank" href="http://www.google.com/">Google</Button>
target="_blank"
를 사용하면 버튼을 눌렀을 때 새 탭으로 열린다.
Security
When you use
target="_blank"
with Links, it is recommended to always setrel="noopener"
orrel="noreferrer"
when linking to third party content.
rel="noopener"
prevents the new page from being able to access the window.opener property and ensures it runs in a separate process. Without this, the target page can potentially redirect your page to a malicious URL.rel="noreferrer"
has the same effect, but also prevents the Referer header from being sent to the new page. ⚠️ Removing the referrer header will affect analytics.
만약
target="_black"
를 사용한다면rel="noopener"
나rel="noreferrer"
를 함께 사용하길 추천합니다. 이 코드들을 사용하지 않는다면 redirection시 해당 페이지가 섞여 들어갈 수 있습니다.