Solution 1 :

Is the refreshing ocurring only the first time you click on an anchored link? or does it happen every time.

Perhaps you have POST data present (like you arrived on the page after submitting a form). I think the behaviour you describe matches that scenario.

Problem :

Recently, I’ve been working on a WordPress website powered by the Divi theme and builder. Some of the pages have a menu with the URLs set to ID’s of certain sections of the page (anchor links) but when clicked, the page refreshes and then scrolls to the relevant section.

What would cause a page to refresh when an anchor link is clicked? I’m baffled!

I’ve tried changing the URLs (to the below) but still have the same problem.
https://www.domain.co.uk/tables/#breakpoint-one
https://www.domain.co.uk/tables#breakpoint-one

In static HTML, coding something like this would take a matter of minutes so I cannot understand why the page refresh occurs.

Comments

Comment posted by GonZo

Yes the problem is weird indeed. Perhaps you have some javascript acting on links.

Comment posted by GonZo

In firefox’s code inspector you can see if there are events linked to tags.

Comment posted by GonZo

In Firefox: hover the cursor over a link and right-click, select ‘inspect element’. Inspector will open up with the link tag focused. The tag will show a label [event] if there is a javascript event attached to it.

By