Javascript – What’s the best way to reload / refresh an iframe


I would like to reload an <iframe> using JavaScript. The best way I found until now was set the iframe’s src attribute to itself, but this isn’t very clean. Any ideas?

Best Solution


be careful, in Firefox, window.frames[] cannot be indexed by id, but by name or index