Firefox rescroll to top when refreshing or back button

Sharky Forums


Results 1 to 4 of 4

Thread: Firefox rescroll to top when refreshing or back button

  1. #1
    Expensive Sushi
    Join Date
    Jan 2002
    Posts
    28

    Firefox rescroll to top when refreshing or back button

    Who knows what code causes Firefox to rescroll my pages to the very top of the browser window when reloading the page or hitting the back button?

    Say for example you're on my web page... you scroll down a bit, click a link, then click the back button and WHAMO! Firefox scrolls you to the top of the page.

    This happens on three of my domains, on two different servers, but only on my PHP pages. My html pages don't rescroll.

    /at my wits end

  2. #2
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203
    First, is this unique to Firefox?

    I suspect it has something specific to do with how it renders PHP pages in that it cannot determine or track where you had scrolled to before.

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

  3. #3
    BozoKiller
    Join Date
    Oct 2003
    Location
    Zoso
    Posts
    7,636
    hmmm... I'm using Moz suite (set as Default browser) and that behavior doesn't happen here at Sharkys (this is considered php here...right ? ) - though I've never would've noticed, as I always open New Tabs when clicking links. But -I just tried it and same page spot.

    Could try to Validate the HTML and CSS

    Another guess is you're not Caching memory of page data
    type about:cache in the location bar
    Delete the Electoral College - Support
    www.NationalPopularVote.com

    "The world according to DRM Bozos"

    I am a consumer, I'll buy anything
    I am a sheep, I am cattle, I follow the herd
    I am ignorant, a dumbass, and I am a bozo...
    I am the epitome of the 'rank and file'
    I am your next door neighbor
    I am 95% of American Consumers
    I will consume you

    • If the light in your head hasn't come on yet,
      I suggest you go get a new bulb!

  4. #4
    Reef Shark
    Join Date
    May 2001
    Location
    Florida
    Posts
    421
    Well, this really shouldn't be a problem within any PHP code. The client browser will never even see the PHP code as it is all processed on the server. The browser should render the page as any other HTML page since the the browser will output based on the content-type header rather than the extension on the file.

    Do you have any pages of example you can point us to?
    | Processor | Intel Pentium 4 @ 2800 MHz | Motherboard | ABIT IC7-Max3 | Memory | 2 GB Corsair XMS PC3200 DDR | Graphics | ATI Radeon 9800 Pro | OS/Prog HDD | W.D. Raptor 36GB (10k) SATA | Storage HDD | Seagate 160GB (7200) SATA | Burner | Lite-On 52x24x52 CDRW | DVD-ROM | Lite-On 16x DVD | Sound Card | Philips Acoustic Edge | Speakers | Klipsch ProMedia 2.1 | Flash Media | Lian-Li Flash Media Bay | Display | Dual NEC 22" Flat CRT | Case/PSU | Lian-Li PC-65B w/ Antec 430W | O.S. | MS Windows XP Pro | Printer | Epson Stylus Photo 2200

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •