Android Chrome's url prefetch breaks page height (and thus sticky footer)

57 views Asked by At

I was trying to create a page with sticky footer, when I found it. If you type your url several times in searchbar so that chrome would prefetch it when you've typed it but didn't hit go (enter), then the page is loaded with bigger height for some reason. (Only on Android, but it happend on all my devices).

At first I thought that maybe my styles were wrong, but the I've checked it against typical examples such as:

To reproduce it just open new tab, write full url and wait some time before hitting go so it will prefetch. May not work for the first time, then just close opened tad, open new one and once again type the full url, wait and after hitting go you will not see a footer in the end of the page untill (for some reason!!) tapping in any place of it.

While figuring out I also found out that https://viewportsizer.com/ gives for my Pixel 6 height of 1112px it loaded with prefetch (as described above) and waited for some time to display numbers, while actual Pixel 6 height (without prefetch) is 790px and it could be seen on that same site.

(Screenshots are with prefetch load and after touching the screen)

bootstrap's sticky footer with prefetch bootstrap's sticky footer after touching the screen viewportsizer with prefetch viewportsizer after touching the screen

So my questions is..

Is it a bug? Is it a known issue? And most of all are there any workarounds? Can my site detect being loaded with wrong\prefetched height and somehow reload the page afterwards?

0

There are 0 answers