Meaningless Drivel is fun!
The moose likes HTML, CSS and JavaScript and the fly likes clearing address bar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "clearing address bar" Watch "clearing address bar" New topic

clearing address bar

gino mendoza

Joined: Jul 12, 2002
Posts: 20
I have a JSP page that intially displays in the address bar the JSP file name, and parameters.
After displaying the page I want to be able to hide the paramaeteres or clear the address bar.
Can I do this in JSP, or javascript?
I'm trying to prevent users from sending the URL by email to others.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

JSP, being a server-side technology, cannot affect the browser controls.
I do not believe that there is a Javascript solution (at least not a standard one), but I'll send this off to the HTML/Javascript forum in case someone knows of a trick that can help you.

[Asking smart questions] [About Bear] [Books by Bear]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can not hide anything in the address bar.
There is a way to use frames to do it, but you would still have that initial link with the parameters in it. Any smart person would know how to get that link out of the frames anyway.
If you really want security, I would rethink it on the server side and avoid using client side technology.
I agree. Here's the link:
subject: clearing address bar
It's not a secret anymore!