<iframe></iframe> is useful in many aspects. There are times when you want to refresh the content of an iframe and reload the page in it, without refreshing that of the main page, and it can be achieved with a tiny property of iframe, src.
Letâ€™s say you have an iframe of captcha that enables the user to refresh it and serves different security code every time.
<iframe name="security-code" id="security-code" src="/gen-captcha-image.php"></iframe>
refreshCaptcha() looks like this: