You are here: irt.org | FAQ | JavaScript | Window | Q308 [ previous next ]
Its a security thing. It'll work without asking if there is only one location in the browsers history, if theres more than one, it prompts the user for confirmation. If this becomes a problem, you can always restrict the history of a window to one location by using the replace() method, for those browsers that support it.
If the window was opened from Javascript (like window.open() method), while closing those windows, user will not be prompted. Where as if the window was opened self, like (Target='-blank' etc), while closing those windows, user will be prompted.