Dynamically added page with external header / footer makes page jump

Dynamically added page with external header / footer makes page jump

I have a page with one static page and one dynamically generated page.
When changing page to the generated one it will be placed ontop of the header for a short period of time.
After a few milliseconds it will jump into the correct position.
Here is a fiddle showing the problem, going to page2 will generate a page and going "home" will show the static page.