How to disable the url address bar using javascript or jquery - Stack Overflow

I've got a spring mvc framework and I want to disable the url address bar when the page loads! (It

I've got a spring mvc framework and I want to disable the url address bar when the page loads! (It's not a public web application) How can I achieve this using javascript or jquery.

Update :

Guys, If I can make the url bar read only that would be okay too!

I've got a spring mvc framework and I want to disable the url address bar when the page loads! (It's not a public web application) How can I achieve this using javascript or jquery.

Update :

Guys, If I can make the url bar read only that would be okay too!

Share Improve this question edited May 3, 2013 at 3:57 Imesh Chandrasiri asked May 3, 2013 at 3:46 Imesh ChandrasiriImesh Chandrasiri 5,69915 gold badges63 silver badges107 bronze badges 8
  • You can't do this, and for good reason. – Justin Helgerson Commented May 3, 2013 at 3:47
  • 2 You could create your own browser that allows this to happen. Otherwise, no. – Ian Commented May 3, 2013 at 3:48
  • c'mon guys, we can be creative. You can instruct the user to go full screen? You could write a browser extension? You could contact the IT guys and block all outgoing connections? – Kavi Siegel Commented May 3, 2013 at 3:50
  • @KaviSiegel - Since when does jQuery make the IT guys block outgoing connections? – Justin Helgerson Commented May 3, 2013 at 3:51
  • 2 opening a new popup window with window.open can set location (address bar) to read only...see: stackoverflow./questions/2909645/… – MikeM Commented May 3, 2013 at 3:53
 |  Show 3 more ments

4 Answers 4

Reset to default 1

One potential workaround is to create a simple WPF app that hosts a web browser control that fills up the entire form. The web browser control does not have the url address bar,so you can simulate what you're describing using this approach. Might work since you said it's an internal application.

Note: The browser control will behave like IE

You cannot hide the address bar in your browser programmatically.

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

I am afraid this is mission Impossible. You can't hide something that is directing you. The link on webpages are all visible. The concept to hide url is to making them non understandable. Encrypt the certain portion of the url like id, slug ...

  1. You can make location bar readonly only if you are using window.open.
  2. In case of IE, we can change the setting of browser for this. But this may not be good idea.

so for just disabling location bar by using window.open, the code is as follows:

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

In the example above, location=no disables the location bar. You can change the value of size,scrollbars, menubar etc. as your choice.

Thank you.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745649201a4638156.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信