Search code examples
javascriptjquerygoogle-chromedomwindow.open

Disable location bar in Google Chrome


I'm using window.open for a click event in jQuery. The problem is that I want to disable the location bar, it works in Safari but not in Chrome. I heard somewhere that it is impossible to get rid of the location bar in Chrome, is this true?

Here's the code:

var features = "left=200,toolbar=0,resizable=0,scrollbars=0,location=0,menubar=0,status=0,width=510,height=547";
window.open(URL, NAME, features);

Solution

  • You can't get rid of it in chrome, but location=0 will make it so that it can't be edited at least. It will still appear, but they can't change the location. Past that, there's nothing you can do, though.