When I click a button it shows an iframe(with 1 image), then when I click the button again,it loads a different iframe on the same location. This is slow. How to speed up?

When we click and load images, it shows white for a fraction of second until the image loads when images change. I used a javascript to pre-load images and that 'white time' is not visible anymore coz it is fast. How to do the same with iframes so they will load fast on each click and the loading time is almost none.