How to disable url address bar using javascript or jquery

I have a spring mvc framework and I want to disable the address bar of the URL when the page loads! (This is not a public web application) How can I achieve this using javascript or jquery.

Update:

Guys, if I can make the url string read-only, that would be fine too!

+1
source share
4 answers

One possible solution to this problem is to create a simple WPF application that hosts a web browser control that fills the entire form. The web browser control does not have a URL bar, so you can mimic what you are describing using this approach. May work as you said this internal application.

Note. The browser control will behave like IE

+1
source

You cannot hide the address bar in the browser programmatically.

You can hide the address bar in browser windows opened by your javascript code, although I think some browsers even override this now.

0
source

I fear this mission is Impossible. You cannot hide what guides you. All visible links on web pages. The concept of hiding a URL is to make them incomprehensible. Encrypt a specific part of the URL, e.g. id, slug ...

0
source
  • You can make the location bar read-only only if you use window.open.
  • In the case of IE, we can change the browser setting for this. But this may not be a good idea.

so to simply turn off the location bar using window.open, the code looks like this:

subwin = window.open(url,"dummyname",'width=635px,resizable=no, height=535px, menubar=no, toolbar=no, location=no, scrollbars=no'); 

In the above example, location = no disables the location bar. You can change the size, scroll bar, menu, etc. Of your choice.

Thanks.

-1
source

All Articles