ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

I love Google, unLESS I've no idea what I'm looking for...

September 27, 2007 11:22am

Subscribe [6]
  • #1 / Sep 27, 2007 11:22am

    Lanitha

    13 posts

    Title says it all. I’m trying to find out how a certain something is done, but I have no idea what that would be called…

    Say you’re on a web page and you’re happily scrolling down until an interesting-looking link catches your eye. You click the link and check out that page. Now, if you hit the ‘back’ button, two things can happen:

    1) You’re brought back to the page where you started, at the top of that page (which requires you to scroll back down again to find the point where you had left of).
    2) You’re brought back to the page where you started, at the exact same spot where you left it. (Examples: Here in the forums or in Googles search results.)

    I want to know more about that second scenario. I’m guessing the first behavior is default and the second is achieved through Javascript or something?
    I suppose it’s also something that wouldn’t work equally well which each different browser, but I’d just like to find out more about the behavior to begin with.

    Question: What the heck am I looking for?
    😉

  • #2 / Sep 27, 2007 1:57pm

    Wibble

    1 posts

    I’m pretty sure what you are looking for are ‘named anchors’.

  • #3 / Sep 28, 2007 6:54am

    Lanitha

    13 posts

    Hey Wibble!

    Thanks for your response!

    Anchors were my first thought, but while that would work within a certain webpage and even a website, it wouldn’t work from one website to the next (as far as I can see)...

    If I limit my search for answers to them being used within on website (for now), the next question would be how those anchors could be assigned dynamically… As far as that goes, Google is only throwing me results about such a thing with Flash. Hmm…

    Never mind me just thinking aloud here! 😛

    Thanks again!

  • #4 / Sep 28, 2007 7:52am

    allgood2

    427 posts

    I believe what you are discussing is ‘saving state’. It is something that anchors, javascript, and other languages can do, but in the instance you refer of, it’s just a property of the browser itself. For example, Safari is surprising good at restoring state when using the back button. I’ve used this function, not just to go back to an article, but even to retrieve data posted into forms—weblog entries, comments, etc. I’ve come across sites, that limit content of posts without warning, beforehand or on submission. So if a post was long-winded, you get cut-off. Using the back button in Safari has often allowed me to retrieve full-text of the original post, so I can edit it, versus the cutoff text provided by the site.

    Javascript can be used to set various ‘state’ item, but I’m not certain if you can use it to make peoples browsers more consistent—though I guess anything is possible, and I’m not a Javascript guru, so maybe you can. And even with browser state, I find that sites that have auto-refresh often lose that data if you leave the site. Which is why I open links as new tabs. It’s more consistent.

  • #5 / Sep 28, 2007 5:36pm

    JT Thompson

    745 posts

    It also makes a difference on the actual pages you’re going back to.

    if the page you’re going back to has no dynamic data and it’s a static HTML page you’ll go right back the same place.

    But depending on the code of the page, if you go back to a page that has a refresh in the meta tag, or anything else dynamic it can refresh the page leaving you at the top again.

  • #6 / Sep 29, 2007 9:05am

    Lanitha

    13 posts

    Thank you allgood2 and JT for chiming in!

    I’ve certainly noticed that the behavior is different from one browser to the next. Firefox is usually very good at jumping back to the right spot (like Safari), whereas IE (very unsurprisingly) mostly goes back to the top of a page. I just figured there must be some way to control it somewhat as a designer.
    From what I gather so far, the options to do so are very limited and not well-supported. Hmm…

    It’s interesting that there’s a difference between dynamic and static web pages! Never really noticed that…

    So thanks again for your helpful input. This is certainly something I’m eager to sink my teeth in, so it helps to know which direction to look in.
    😉

  • #7 / Oct 02, 2007 1:46pm

    quena

    66 posts

    FireFox does seem to do a good job, even on pages with a periodic refresh (e.g. http://news.google.com).

    As for design, the only thing I’ve noticed is that shorter/more light-weight pages seem more likely than longer/heavier ones to allow you to recover your original spot. Sometimes waiting for all the elements on the page to load helps; I’ve noticed that the browser defaults to the top of the page until the section last viewed is reloaded. (Or am I thinking of named anchors?)

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases