Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#12603 closed defect (bug) (invalid)

When Wordpress shows a web page in reality is loading more of one behind

Reported by: ideasnopalabras's profile Ideasnopalabras Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.9.2
Component: Performance Keywords: reporter-feedback
Focuses: Cc:

Description

When Wordpress displays a web page really is loading more than one page at the same time in the background.

For example if we open an interior (a single):
http://ideasnopalabras.com/2010/07/sample1/

Wordpress load that page and displays it normally, but behind load other pages immediately:
http://ideasnopalabras.com/2010/08/sample2/
and/or
http://ideasnopalabras.com/2010/06/sample0/

And sometimes also charges the principal (Home):
http://ideasnopalabras.com/

That is, for a request for a page, load actually at least 3 web pages. This problem apparently only happens with Pretty Permalinks.

To observe it carefully, record requests for the URL and load a single page and see that several pages are load at same time. You could use my function below, just have to put it at the beginning of the file "functions.php" of any theme. Just look at the file "recordRequestURI.htm" generated for to log requests.

<?php
debug_recordRequestURI();
function debug_recordRequestURI()
{
 $aux=isset($_SERVER["REQUEST_URI"])?$_SERVER["REQUEST_URI"]:false;
 $registro="REQUEST_URI: $aux <br />";
 
 $fFichero=fopen(WP_CONTENT_DIR."/recordRequestURI.htm",'ab');
 if($fFichero)
	{
	fwrite($fFichero,$registro);
	fclose($fFichero);
	}
}

?>

I hope my observation be useful for the community and you can solve it, because so Wordpress is eating up server resources. Thank you.

Change History (10)

#1 @Ideasnopalabras
15 years ago

  • Cc Ideasnopalabras added

#2 @Ideasnopalabras
15 years ago

  • Cc Ideasnopalabras removed

#3 @GautamGupta
15 years ago

  • Cc GautamGupta added
  • Keywords load server resources performance removed
  • Milestone changed from Unassigned to 3.0

#4 @dd32
15 years ago

In the case of the given links, This is due to the Canonical redirection.

Specifically, You have your WordPress settings set that the site url is "www.ideasnopalabras.com" whereas, the links you are providing are "ideasnopalabras.com".

The result is that WordPress will redirect you to the proper page, For example, "http://ideasnopalabras.com/2010/07/sample1/" redirects to "http://www.ideasnopalabras.com/2010/07/sample1/"

Is that the situation you're seeing? Or is it something different?

#5 @dd32
15 years ago

  • Keywords reporter-feedback added; permalinks REQUEST_URI removed

#6 @dd32
15 years ago

  • Milestone 3.0 deleted
  • Resolution set to invalid
  • Status changed from new to closed

After chatting with ocean90 on IRC, its been pointed out what the issue is here.

Canonical Redirection is not to blame (Although it will be redirecting the www. changes there)

This is a feature of Firefox, Specifically, Firefox loads the next page you're likely to visit..

If you're not running a caching plugin, this may cause Firefox to load the page twice instead of caching it correctly.

#7 @dd32
15 years ago

Viper007Bond has pointed out that its the "Prefetch" functionality: http://kb.mozillazine.org/Network.prefetch-next & https://developer.mozilla.org/en/Link_prefetching_FAQ

Firefox will automatically load any <link> elements with rel="next" or rel="prefetch".

#8 @ocean90
15 years ago

  • Priority changed from high to normal
  • Severity changed from critical to normal

To test it open about:config and set network.prefetch-next false and then load the site again.

#9 @Ideasnopalabras
15 years ago

Hi:

The links were just examples, regardless if you have www or not.

Anyway good observation that can be browsers that make such behavior and not Wordpress itself.

I tried network.prefetch-next false and now only loads the corresponding internal web page (the single) but still charging the main (home) at the same time in the background, in both: Firefox and Internet Explorer. It was tested without plugins and with the standard theme.

I will try removing all <link> elements with rel="next" and rel="prefetch"

And then again the results public. Thank you

#10 @SergeyBiryukov
12 years ago

#22094 was marked as a duplicate.

Note: See TracTickets for help on using tickets.