Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Just in case: PHP 8.x in use on XAMPP testing it all on a Windows 10 Edge.

There is a menu on top of it that allows me to choose the page I want to see.

If I click on any option of the menu the page loads correctly.
If I refresh the page (F5, CTRL+F5) the page loads correctly but with a small vertical offset.

In fact, every time I press F5 to refresh the page it jumps to a different place.

I can't really figure out why this is happening.

I know I am not giving much information and I hate it, but... does this ring a bell to you? what would you check if you'd have to diagnose this issue?

As always, thank you all!

What I have tried:

Stomping my head on the table.
Posted
Updated 14-Aug-22 10:46am
v3

1 solution

Quote:
what would you check


I would use Chrome, click one of the topmost parts of the page, right click, choose Inspect, both for the original and for the reloaded page.
That is bound to tell what HTML/CSS code got executed.

As a wild guess, you could have some CSS that gets in late in the original page, and its locally cached version is present right away in the reloaded page.

:)
 
Share this answer
 
Comments
Joan M 14-Aug-22 17:03pm    
Just done this, right click, view source code, copied it, pasted into winmerge, reloaded the page, and repeated the action. Both codes are the same... :'(
I will do what you suggested tomorrow, let's see if I can find anything there...

Thanks Luc!
Luc Pattyn 14-Aug-22 17:07pm    
you're welcome.
"Inspect" is quite different from "View Source", it gives you the documents building blocks with their dimensions, styles, everything, as rendered by the browser. I use it all the time on Chrome, I can only hope Edge offers something similar, I don'tknow, I avoid MS browsers as much as possible.
Joan M 15-Aug-22 3:30am    
Found what was going on... the small javascript that alerts the user of the cookies (google stats and bing stats) is messing things up... thanks for your post. Will have to re-read the cookie laws and, just remove that stupid banner if possible...
:)
BobbyStrain 14-Aug-22 19:38pm    
If it works OK with the refresh button, you shouldn't be concerned.
Joan M 15-Aug-22 3:32am    
I am concerned because the company logo, the ability to choose language and the menu to navigate the site are hidden after that undesired scroll happens after refreshing.
In any case I've found the reason, a javascript for the cookies banner is the reason for this to happen.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900