Naked Science Forum

Non Life Sciences => Geek Speak => Topic started by: Simulated on 08/03/2008 07:14:13

Title: How come when you refresh your browser some times it takes you to the top?
Post by: Simulated on 08/03/2008 07:14:13
While others it takes you to the same spot you were at before you refreshed. I've noticed it alot. Expecially since I press refresh on this site all the time. Ha

Thanks Sim :)
Title: How come when you refresh your browser some times it takes you to the top?
Post by: DoctorBeaver on 11/03/2008 07:58:59
I'm not entirely sure, but it could have something to do with caching.

I tried an experiment with this a while ago. I loaded 1 of my own pages, went halfway down and hit refresh. It loaded to the same place. Then I updated the page while it was still in my browser and hit refresh. The browser took me to the top of the page.

I then added a "no cache" instruction at the top of the page and tried it all again. The browser took me to the top of the page both times.
Title: How come when you refresh your browser some times it takes you to the top?
Post by: that mad man on 11/03/2008 19:46:16
I think its to do with the html code or the way the page is coded.

I was on a site a while ago that had been given a face lift and it did that each time I clicked a link and then closed it, also the same with refresh, the old site didn't do that. I found it annoying so I emailed the author, he emailed back later with "sorted, try it now" and it never happened again.

Not sure what he did though and never asked but I now wonder if its to do with updating "cookies"
Title: How come when you refresh your browser some times it takes you to the top?
Post by: another_someone on 11/03/2008 20:26:29
Doubt that cookies would have anything to do with it.

It is conceivable that it is to do with the was CSS positioning is handled (or, if Eth suggests that setting no-cache may influence it, it seems strange, and I would wonder if that is not a bug in the browser).

I do wonder this applies to all browsers, or just some browsers.
Title: How come when you refresh your browser some times it takes you to the top?
Post by: Simulated on 11/03/2008 21:05:45
I'm running IE 7, but it did happen on the verison had I before it IE something, probably 6 ha
Title: How come when you refresh your browser some times it takes you to the top?
Post by: DoctorBeaver on 11/03/2008 21:38:05

... (or, if Eth suggests that setting no-cache may influence it, it seems strange, and I would wonder if that is not a bug in the browser).

I do wonder this applies to all browsers, or just some browsers.

I tried it in Opera, Firefox, IE6 & 7, K-Meleon & Safari. Safari & IE7 acted differently but the others were the same.
Title: How come when you refresh your browser some times it takes you to the top?
Post by: Simulated on 11/03/2008 21:45:01
What's the same Doc? Took you back to the top or took you to the place you pressed refresh?
Title: How come when you refresh your browser some times it takes you to the top?
Post by: DoctorBeaver on 15/03/2008 22:42:00
I mean that I tried the same tests and got the same results.
Title: How come when you refresh your browser some times it takes you to the top?
Post by: Simulated on 15/03/2008 23:07:07
OK some acted the same and some acted different. What is the same and what's the different. I just must be missing something
Title: How come when you refresh your browser some times it takes you to the top?
Post by: DoctorBeaver on 16/03/2008 09:09:12
As I said previously...

I tried an experiment with this a while ago. I loaded 1 of my own pages, went halfway down and hit refresh. It loaded to the same place. Then I updated the page while it was still in my browser and hit refresh. The browser took me to the top of the page.

I then added a "no cache" instruction at the top of the page and tried it all again. The browser took me to the top of the page both times.

Opera, Firefox, IE6 & K-Meleon acted like that. Safari & IE7 acted differently.
Title: How come when you refresh your browser some times it takes you to the top?
Post by: Simulated on 16/03/2008 12:59:51
Yeah my minds just all woajldkfjalksdjflakjdf thanks for your time doc