WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#19018 closed defect (bug) (invalid)

get_adjacent_post_rel_link

Reported by: Ninos Ego Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: General Keywords:
Focuses: Cc:

Description

The function mentioned in the summary causes a double load of pages. If I reload page A. Page A is loaded and about 3 sec. later, the page mentioned in the <link rel="next"> tag, in the header, loads invisibly in the background. This is probably thought to be a caching feature, but as it is now, you can imagine, this has an enormous effect on the tracking and pageimpression measurement of every wordpress intallation.
Our development Team realized this bug while developing our custom database tracking, as there where after reloading one page two new entries for each page visited.
We are about to put a big Marketplace Site, based on Wordpress, to production. This issue is very urgent for us, because not only the tracking and updating features but several other important features are affected by this problem.
Solution proposal:
Maybe you can set a flag so it is possible to turn off this function writing those links into the header.

Change History (3)

#1 @andrewryno
9 years ago

  • Keywords needs-patch removed
  • Resolution set to invalid
  • Severity changed from blocker to normal
  • Status changed from new to closed

Prefetching is likely being done by the browser, not WordPress. Use:

remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );

in order to move the rel="next" and rel="prev" link tags from <head>.

#2 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted

#3 @Ninos Ego
9 years ago

I have forgotten this function. Thank you very much.

Note: See TracTickets for help on using tickets.