The Naked Scientists

The Naked Scientists Forum

Author Topic: How come when you refresh your browser some times it takes you to the top?  (Read 5551 times)

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
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 :)


 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
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.
 

Offline that mad man

  • Hero Member
  • *****
  • Posts: 724
    • View Profile
    • My music
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"
 

another_someone

  • Guest
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.
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
I'm running IE 7, but it did happen on the verison had I before it IE something, probably 6 ha
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile

... (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.
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
What's the same Doc? Took you back to the top or took you to the place you pressed refresh?
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
I mean that I tried the same tests and got the same results.
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
OK some acted the same and some acted different. What is the same and what's the different. I just must be missing something
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
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.
« Last Edit: 16/03/2008 09:11:00 by DoctorBeaver »
 

Offline Simulated

  • Neilep Level Member
  • ******
  • Posts: 7188
  • Thanked: 1 times
  • Simulated..What more do you needa know :P
    • View Profile
    • Facebook
Yeah my minds just all woajldkfjalksdjflakjdf thanks for your time doc
 

The Naked Scientists Forum


 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums