Reload iframe with code

There are some situations when you need to refresh the iframe.

So in that case you just need to touch the iframe src attribute & it will relaod the iframe.


document.getElementById('i_frame').src = document.getElementById('i_frame').src;

This code will also help you in a situations where browser stores iframe in cache, with this method you can avoid iframe loading from cache.

Leave a Reply

Your email address will not be published. Required fields are marked *