so you need to add the code to all the iframes or run over all the iframes and add it to them (not simple)
The better method is to store each frame in a cookie and allow refresh of the main window, putting the frame content to all subframes when reloading. As an internet user, I ALWAYS rightclick on the frame and do refresh frame if I want to only refresh a frame. I never expect the f5 to work with single frames