Log in

View Full Version : url in address bar



peejeno
12-06-2006, 06:10 PM
hi, is there anyway to stop the url from showing in the address bar? i want the main address to show, ex. (www.mysite.com). i have found this to work by using iframes and frames. so i have found that to work, and it works great. but when the user starts to type in the address in the address bar, a url like (www.mysite.com/pages/aboutus/us.html) comes up, is there any way to stop this from coming up? mayeb with a js or php file, maybe even in the .htaccess file. some sites like myspace and facebook and msn it works on. can someoen help me? thanks

-peej

djr33
12-07-2006, 03:29 AM
It would be possible with a Javascript redirect to check if the page isn't in frames, but this is just annoying. By disabling javascript, it would stop the redirect.
Your source code can't be protected like this, if that's your goal.
Perhaps explain what you are trying to do and we can help more.

I believe there might just be a way with javascript to just change the URL bar to display for example "my.com" instead of the exact page, if you're just doing it for asthetic reasons, but I don't think that's necessarily a great idea... it could confuse people and not allow them to access the page.

Twey
12-07-2006, 11:30 AM
I believe there might just be a way with javascript to just change the URL bar to display for example "my.com" instead of the exact pageThere isn't. This would be a security risk.

peejeno
12-07-2006, 01:16 PM
would a cache setting stop the page from showing in the address bar history?


What is address bar history?
Address bar, also known as the "Location bar", is a text box used to enter a web site address in a browser. Web browsers allow users to click the down arrow to view the recently visited pages. So, the address bar history shows some of the web sites you've recently visited and anyone who has access to your computer and starts to type in the address bar will get a drop down url list with the web sites you've visited.
Using ClearAllHistory you can delete Address bar history in Internet Explorer, Mozilla, Mozilla Firefox, Netscape and Opera. Clearing address bar history is included in "Clear browser history" feature.
:confused: :confused:

is there a way to do this server side so that the user couldnt see it.

thanks.

-peej

Twey
12-07-2006, 02:51 PM
No, and no.

The real question here is, why?

peejeno
12-07-2006, 03:58 PM
so how do sites liek myspace and hotmail and microsoft do this, there address lines look like this.
http://www.dynamicdrive.com/forums/newreply.php?do=newreply&noquote=1&p=64444

and when the user goes back to this website, and starts to type in www.micros.... it wont come up in theddress bar history as
http://www.microsoft.com/home/go.php?=g67191jhg301.cfdm
:confused:
does any oen know?

Twey
12-07-2006, 05:27 PM
Likely, it sends a permanent redirect response code.

The question remains.

boxxertrumps
12-07-2006, 09:59 PM
the only risk you would have is people farming your media.
but if its on the internet, expect it to be farmed.

Twey's Question Must Be answered.

chechu
12-14-2006, 05:09 PM
Place this in the head:

<script language="JavaScript">
<!-- Hide the script from old browsers --

function a(txt) {
self.status = txt
}
function b() {
self.status = ""
}
// --End Hide -->
</script>


And this in the body:


<a href="content.html" target="content" onMouseOver="a('home');return true" onMouseOut="b()">home</a>

But again, if Javascript is disabled, it's useless ...

chechu
12-14-2006, 05:10 PM
Sorry, just checked again, and found out it wasn't what you were looking for.
Wrong answer. Sorry ...

mwinter
12-14-2006, 07:58 PM
<script language="JavaScript">

The language attribute has been deprecated for years.



<!-- Hide the script from old browsers --

"Hiding" scripts is also a long outdated practice.



function a(txt) {
self.status = txt
}

The status bar is not a toy. There should never be any reason for an author to change its content.



But again, if Javascript is disabled, it's useless ...

It can be useless in any decent browser: changing the status bar through scripts can be disabled.

Mike