The following code used:
<script>
if(screen)
{document.writeln("Your screen resolution is: "+screen.width+" x "+screen.height);
}
</script>
If you are creating an on-the-fly document from JavaScript you just can't place something like document.writeln("<SCRIPT>")
The browser will screw up on this tag. So to avoid this problem you can use the following code instead
document.writeln("<SC"+"RIPT>");
Place this code somewhere in the top of your document. So if somebody comes to this page directly around frameset, frameset.html will be loaded.
<SCRIPT>
if(window==top.window)
{top.window.location='frameset.html'}
</SCRIPT>
You will find a more complicated but more flexible Script example here.
Suppose your page will be linked as a part of another site frameset? Want to "jump out"? Place this code at the top of your document:
<SCRIPT>
if(window!=top.window)
{top.window.location=""+window.location}
</SCRIPT>
Do not be afraid to open your browser window larger than the screen, its size will be limited with sceen resolution. The only problem is that older browsers won't place new window at top left corner. But, MIE4 and NN4 will do this.
<script>
window.open("","windowName","width=2000,height=2000,screenX=0,screenY=0");
</script>
Place this code inside <HEAD></HEAD> of the child window:
<SCRIPT>
function ontop()
{self.focus(); setTimeout("turnback()",200);}
ontop();
</SCRIPT>
You can do it without JavaScript. You can create frameset with hidden (zero size, non resizable and borderless) frame. All you need is to place all your images in this HTML document. So all images will be loaded in this frame and cached.