What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

In stackoverflow sites, if we hit the refresh button. It will automatically scrolls to the exact position where we were while hitting the refresh. I would like to know what is the name of this feature/technique.

We normally achieve this by appending #ref "ahref" to the url.

Using what technology it is implemented. Is it anything I can do with plain HTML?

share|improve this question
    
Don't most sites do this be default on refresh? Although I'm sure some don't. –  DaveShaw Aug 27 '10 at 20:28
1  
It's a browser feature. Also what's the random "html5" tag for? –  Matti Virkkunen Aug 27 '10 at 20:30
1  
How does this belong on meta? It's asking about HTML technologies and not about how SO works. SO was just given as an example... –  0xA3 Aug 27 '10 at 20:35
    
@Matti Very recently, I noticed. So, I thought this could be one of HTML5's feature. –  Avatar Aug 27 '10 at 20:55
add comment

migrated from stackoverflow.com Aug 28 '10 at 2:08

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 8 down vote accepted

This works on all websites, or at least just about all. I don't think this is a particular feature, the browser just does this to give you a better experience.

If this is not working on a site, you might want to check if there is anything still loading. Browsers usually wait until the entire page loads before scrolling you to where you were, and if you have a script or something else blocking the page from finishing loading, you might not be jumped back.

share|improve this answer
    
Oops! I didn't noticed this on other sites until reading this. My bad. –  Avatar Aug 27 '10 at 20:50
add comment

As Brian said this is a feature of most browsers. However, you might experience problems when doing a post-back in ASP.NET. There used to be a feature called Smart Navigation to keep the scroll position. Maybe this is what you had in mind?

share|improve this answer
    
Thanks to know :) –  Avatar Aug 27 '10 at 20:54
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .