How to reload iFrame using jQuery

Simple but useful jQuery code snippets to reload an iFrame or reload all the iframes using jQuery.
//reload 1 iframe
$('#iframe')[0].contentWindow.location.reload(true);
 
//reload all iFrames
$('iframe').each(function() {
  this.contentWindow.location.reload(true);
});

//Another way to reload all iFrames
$('iframe').attr('src', $('iframe').attr('src'));
Feel free to contact me for any help related to jQuery, I will gladly help you.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..