Firefox refresh makes PHP page "jump" to the top - problem with dynamic content? (not IE)

Posted on 2006-03-22
Last Modified: 2013-12-12
I am writing a dynamic website that uses PHP/Mysql to load content, yadda yadda. That part is moot.

When I'm viewing my site in firefox, if I scroll halfway down and click refresh, it jumps to the top of the page. This doesn't happen in IE on the same page. Is this some kind of problem with dynamic navigation bars influenced by PHP?

An example is on this site (not mine) scroll down some and click refresh in FireFox:

What, in general, causes this to happen? How to large sites like that are heavy dynamic content stop this from happening?

Question by:acidgold
    LVL 15

    Accepted Solution

    Hi acidgold,

    Not entirely sure what would cause this problem, but I don't think that custom scrollbars would do it.  Perhaps it is a result of having some type of onload() javascript that is executing when the page loads... I noticed that the example page you gave uses onload() several times.  If you're really wanting to find out exactly what is causing the problem, the best thing to do would be create a simple test page and gradually add all of your scripts/code to it (testing the refresh effect between additions).  

    Hope this helps!  ;)

    Author Comment

    I meant dynamic menus (navigation of website) when I said navigation bars.

    Either way, I noticed that this problem happens on some of google's pages too. If there is something wrong with a google site, chances are there is actually something wrong with your browser, I learn :)

    So I am dismissing the problem for now, although I'll take your advice if it ever REALLY gets me annoyed.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now