Page 1 of 1

Firefox is loading 2 pages for everyone one requested [Solved]

Posted: Tue Sep 08, 2009 3:24 am
by styson
Greetings,

This one has me pulling my hair out.  When Firefox loads a requested page say http://www.domain.com/ it wiill also load whatever page is listed in the

Code: Select all

{cms_selflink dir="next" rellink=1}
link.  When this second page is loaded you never see it. It however shows up in the statistics module and it's causing some issues with some custom code on the site.   They are running CMSms 1.4.1 and I've tested a default install and it does not exhibit this behavior.   They have the following modules installed:



Captcha0.3.1
CustomContent1.5.2
FormBuilder0.5.11
Forum0.9.2
FrontEndUsers1.6.2
MySQLDump1.2.3
Statistics0.8.0b9



What I've tested:
  • * Default install.  This does NOT exhibit the behavior.
  • * Disabled all session and tab saving within firefox.  No effect
  • * Imported the default template and applied it to all pages. - No effect
  • * Taken all non default module and tag reference out of their template - No effect
  • * Tested with IE 6, 7, 8, Opera 10.00, Chrome 2.x and Safari 4.x (windows) - They do not exhibit this behavior.  Only Firefox 3.x

Anyone have a clue where to start?  My plan is to slowly replicate functionality into a default install until I hopefully find the culprit if it's a module.   In the mean time I've taken the

Code: Select all

{cms_selflink dir="next" rellink=1}
link out of their template which has corrected the problem but this isn't a long term fix since they rely on Google to crawl their site for searching.


All help is appreciated

Re: Firefox is loading 2 pages for everyone one requested

Posted: Tue Sep 08, 2009 4:19 pm
by Pierre M.
Hello,

I'm sorry, I don't understand what this means : "when I point my browser to page A, it also loads page B".
What are you doing ? what is your browser doing ?

Can you setup some tinyproxy between your browser and your server to monitor what is happening ?

Pierre M.

Re: Firefox is loading 2 pages for everyone one requested

Posted: Tue Sep 08, 2009 4:22 pm
by calguy1000
and CMSMS 1.4.1 is WAY not supported any more.

Re: Firefox is loading 2 pages for everyone one requested

Posted: Tue Sep 08, 2009 4:23 pm
by Jeff
It has been posted about before, something to do with your browser caching the next page. Probably for quick loading.

Re: Firefox is loading 2 pages for everyone one requested

Posted: Tue Sep 08, 2009 6:03 pm
by styson
Thanks for the posts.  I am aware of the age of this intsall however do to changes made regarding the news module and css starting in 1.5,  they are not upgrading right now because they will have to rework 24 installations of CMSms.  Anyway, to address Pierre's question,  Firefox, in 1 tab is loading the requested page, but it will also load the page that is in the "next" link in the header.  You never see this page loaded but it happens in the background.  I know it's happening because it is breaking a session variable that is set on each page and I can see it on the statistics module.   If I open the home page, I should see 1 hit and one page load yet firefox gives 2 hits and 2 page loads, one for the home page and one for the next page.   All I know is that a 1.4.1 default install does NOT exhibit this behavior. Firefox loads only 1 page yet there is a "next" link in the header.  I will investigate  ajprog's suggestion.  Something is telling Firefox to load the link.

Re: Firefox is loading 2 pages for everyone one requested

Posted: Tue Sep 08, 2009 7:16 pm
by Jeff
I can't find the thread, but if I remember correctly it has to do with a Firefox plugin.

Re: Firefox is loading 2 pages for everyone one requested

Posted: Tue Sep 08, 2009 7:45 pm
by styson
The Fasterfox add-on and the Google toolbar will do this.  However, the real culprit is Firefox itself.  I messed up my testing of the default site somehow and subsequent re-tests show that firefox loads 2 pages for each one requested.  After a baszillion google searches I found this:  https://developer.mozilla.org/en/Link_prefetching_FAQ

Starting with Firefox 3.5, any link that is a prefetch or next, firefox prefetches in the background.  Nice.  Only way to turn this off is to use about:config in firefox and turn it off.  At least they identify the request as X-moz: prefetch in the header so you can filter it from your logs and whatever else needs to ignore it.  IMHO without a way to stop this behavior at page load, a good idea poorly implemented (it is an HTML standard so I point the finger there).

I'll look at the notes on the statistics module to see of it addresses' this in the latest version if and so.. looks like my client gets to bite the bullet and upgrade to the latest version of CMSms.  Better to pay me to do that than to modify the stats module to ignore this