SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: browser back

  1. #1
    SitePoint Addict einSTein's Avatar
    Join Date
    Aug 2006
    Posts
    275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    browser back

    i need to make a link called "back" to get the browser back 1 page

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <a href="javascript:history.go(-1)">go back</a>
    In search of the clouds...and maybe some work

  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    i'm always curious about this -- what's wrong with the browser's built-in back button?
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    SitePoint Addict dAEk's Avatar
    Join Date
    Oct 2003
    Location
    Stockholm, Sweden
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Me too. Why implement a feature that is already existing in the browser?
    It's the same thing for add bookmark, reload etc. They are all redundant and clutter the page area imho.
    David Shamloo-Ekblad

    Go Habs! | For music addicts: Last.fm, SongMeanings

  5. #5
    SitePoint Guru
    Join Date
    Apr 2006
    Posts
    802
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why implement a feature that is already existing in the browser?
    It is a good link to put in a custom 404 error page,
    along with a link to your site map and any suggested alternatives the requested url may elicit.

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by mrhoo View Post
    It is a good link to put in a custom 404 error page,
    along with a link to your site map and any suggested alternatives the requested url may elicit.
    i agree that a custom 404 should have a link to the sitemap (mine does)

    and suggested alternatives is also an excellent idea (one which i haven't implemented but intend to)

    but i do not agree that a custom 404 should have its own "back" link
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  7. #7
    SitePoint Addict michael - ohio's Avatar
    Join Date
    Dec 2004
    Location
    ohio
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    because there is no such function in HTML

    Quote Originally Posted by r937 View Post
    i'm always curious about this -- what's wrong with the browser's built-in back button?
    The problem is that there is no 'back' function in HTML... the "previosu page" is not held in a session and is not accessible - it's stored in a history "stack" and that is not accessible to HTML so you have to write a function to do it... and it's not always easy due to the dynamic nature of urls.

    "The typical stack-based behavior underlying Back is problematic because some previously seen pages are not reachable through it."

    see article:
    http://www.itl.nist.gov/iaui/vvrg/hf...erg/index.html

  8. #8
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    that article was written in the last millenium

    don't sweat it, man, your users are smarter than you give them credit for

    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  9. #9
    SitePoint Addict michael - ohio's Avatar
    Join Date
    Dec 2004
    Location
    ohio
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I know the article is old - but it's still mostly true: you can't call the browser BACK function directly with HTML - you have to emulate it using a script or function. And even that won't be perfect when accessing dynamic pages because the page session and varibale information may or may not be available.

    While it's true that most people who use a browser everyday understand how to just click the 'back' button - casual users don't know this stuff inuitively.

    Not everyone uses a computer everyday. I have a website for new moms and young women and at least 25% are not computer/browser savvy... and I've had many requests from that segment asking for a way to RETURN to the list of search results (that is easily accessible just by backing up through the pages). I had to add a link to emulate the action just to keep them happy and to put an end to my support emails saying "just use you're browser's BACK button".

    I suspect that is the kind of thing the original poster was getting at with his/her question.



    Quote Originally Posted by r937 View Post
    that article was written in the last millenium

    don't sweat it, man, your users are smarter than you give them credit for



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
  •