Click to See Complete Forum and Search --> : How do I disable the New Window option in the file menu?


IanSane
12-05-2002, 06:08 PM
Does anybody know of a way to make it so that the user can't click File->New Window to open another window with a cached version of a page. I'm making a page with a shopping cart that uses a session ID passed to every page in a form variable and I don't want the user to be able to open a new window using the file menu and thus have two windows open with the same session ID.

I don't literally have to disable the new window function. I just need a way for the new window to not cache the page and therefore run everything as if the user had opened the browser off of their desktop. A way to detect when the user clicks File->New Window would suffice as well.

Sceiron
12-10-2002, 03:01 AM
First, you cannot disable options on the browser window, nor is there an event handler that will let you know when someone has used a specific menu option.

Second, your shopping cart software should be able to handle two windows hitting it at the same time without any problems. Session tracking is something that the server-side scripts should be handling, and it they have issues, I would suggest going with a different application that can handle it (there are plenty out there to choose from).

As for caching, you can try to use meta tags. I don't remember which ones would apply here off the top of my head.