MarathonStudios
MarathonStudios

Reputation: 4321

Webpage loading scrolled part-way down

An odd behavior just popped up on one particular page on my site. While the page is loading, no matter what way you visit the page (refresh, direct input, SERP click, etc) the viewframe is by default partially scrolled down - about 1/5 of the way, just enough to obscure the header. In Chrome, once the peripherals are done loading (analytics and Facebook Graph) the page jerks back to the top. In Firefox, it stays scrolled down even after the page is completely loaded.

Has anyone experienced this before? I tried removing all of my scripts and analytics - this made the load faster, but the scroll issue still remained. I don't have any complicated scripts that could be causing this.

Upvotes: 4

Views: 5920

Answers (2)

lovgrandma
lovgrandma

Reputation: 143

For anyone else you may want to consider commenting out <meta name='viewport' content='width=device-width'> from your header. I was having this issue with my wordpress website and I was cursing wordpress as I thought it was a css loading through javascript problem. It would load properly one or two times and then other times when loading from cache (fast) it would cause this problem.

I commented out the following from the header

<meta name='viewport' content='width=device-width'>

as in I removed it. It did not affect the pages styling so it wasn't an problem at all. Its fixed the issue it seems for me.

Upvotes: 0

Jose Faeti
Jose Faeti

Reputation: 12302

window.scrollTo(0,0); on window load?

Upvotes: 3

Related Questions