tags:

views:

23

answers:

1

We are trying to link to a page and in that link we supply the has to point to an elements id on another page for it to jump immediately down to that element. We know that when checking this functionality on other sites most of the time you don't see the flash of top of the page before the page jumps, we don't know why this might be happening on our site, but it doesn't happen on our staging site.

It always loads the page and then jumps down, it doesn't happen in Firefox or any other browser other then all of the IE versions.

We have memcache installed on the server for production but not staging so this is a possible reason, but I don't know for sure.

+1  A: 

The browser is a progressive rendering device. It will display the page as it downloads. Only when the element corresponding to your #fragment arrives and is added to the page can the page scroll to show it. Until then, better that the browser at least shows something than to leave the user twiddling their thumbs waiting for some page content.

Browsers may download files and update the page at slightly different rates depending on a number of factors, so your particular page may behave differently on different browsers. But in general having a page with a #fragment jump into place after the initial display is a normal and expected part of the web.

bobince
so its probably because the page is loading slower then the other sites that we see are working immediatly? And why does it work in FF and other browsers, are they loading the content differently?
dan.codes
Difficult to say without seeing the page, but there are a lot of factors that can influence loading and rendering delays. For example loading stylesheets and scripts can cause rendering to stop or pause while they're downloading, which might give the rest of the page time to load whilst that's happening, pre-redraw. But that just means the overall loading process is slower. I really wouldn't get too worked up about a ‘flash’ during loading. Web users will be quite used to it.
bobince
I know that is exactly my point about getting worked up about it, but the its not me, it is higher up then me. I tried to explain this, but the weird thing is on our staging site it isn't doing it. Everything is the same except our caching component so I am think the way IE is interpreting the cached html might be different?
dan.codes
Ah. One of *those* situations. Change the browser on the manager's desktop, hopefully he won't notice. ;-) Yes, IE makes a poor show of caching. Check the exact headers coming off the site with Fiddler, in particular `Cache-Control` and `Vary`. (All except for a few values of `Vary` will completely break caching of HTML pages in IE.)
bobince