Browse AjaxPress docs

A link reloads the whole page

On this page

Some links are deliberately left to load the normal way. When a link you expected to be instant reloads the whole page (and restarts a player), one of these is usually the reason.

Ask AjaxPress directly

Open the page with the link, open the browser console (F12, then Console), and run, with the link’s full address:

AjaxPress.shouldBypass('https://example.com/the-link/')
  • true: AjaxPress leaves this address to the browser. See checks 1, 2, 4 and 7.
  • false: the address is fine, so it’s the link itself or the click. See checks 3, 5 and 6.

Compare the link’s address with your site’s, character by character:

  • www.example.com and example.com are different sites.
  • http:// and https:// are different too.
  • A subdomain, such as shop.example.com, is a different site.

Fix old links, and make sure Settings → General has your real address.

A short plain pattern matches anywhere in the address: shop also matches /workshop/. Review Settings → AjaxPress → Advanced → Exclude Links. See Exclude links.

Right-click the link, choose Inspect, and look for target="_blank", _top or _parent. Page builders sometimes add these without telling you. Also check for a <base target="…"> in the page’s <head>.

4. Is it a file, or in wp-admin?

Links to uploaded files (anything under /wp-content/), to /wp-admin/, to /wp-json/, and links with a download attribute always load normally.

5. Were you holding a key?

Ctrl, Cmd, Shift or Alt while clicking, or a middle click, opens the link the browser’s way: a new tab, a new window, or a download.

6. Does another script stop the click?

If shouldBypass returned false and the link has no target, another script is probably handling the click first. A script that calls stopPropagation() on link clicks, without preventDefault(), hides the click from AjaxPress, and the browser loads the page normally. Mega menu, smooth-scroll and “page transition” scripts sometimes do this.

To find it, deactivate plugins one at a time (on a staging copy), or look at the link’s click listeners in the browser’s developer tools (Elements → Event Listeners → click).

7. Is it a language switcher?

A switcher that goes to another domain or subdomain is a normal page load by design. See Multilingual sites.

Still reloading? Report it with the page address and the link.