Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: url in address bar

  1. #1
    Join Date
    Nov 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question url in address bar

    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

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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
    There isn't. This would be a security risk.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Nov 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question this is.

    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.


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

    thanks.

    -peej

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, and no.

    The real question here is, why?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #6
    Join Date
    Nov 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question why?

    so how do sites liek myspace and hotmail and microsoft do this, there address lines look like this. 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
    does any oen know?

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Likely, it sends a permanent redirect response code.

    The question remains.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    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.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  9. #9
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Place this in the head:
    Code:
    <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:

    Code:
    <a href="content.html" target="content" onMouseOver="a('home');return true" onMouseOut="b()">home</a>
    But again, if Javascript is disabled, it's useless ...

  10. #10
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

    Default

    Sorry, just checked again, and found out it wasn't what you were looking for.
    Wrong answer. Sorry ...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •