WebPagetest Forums
Double requests for css - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Double requests for css (/showthread.php?tid=813)



Double requests for css - fritzelly - 06-04-2011 10:01 AM

I'm a bit confused.
Running the test on my site the css comes up twice in the results even though there is only one call to it.
As a test I made a basic page and still the same result
http://www.webpagetest.org/result/110603_J0_RGFT/1/details/
There is two request for it in the Headers page and there is two listings for it in the Details View

Am I going mad...
Ahhh 5 seconds later and I've found the reason
I use //www.blah.com instead of http://www.blah.com for links to css etc so it works on encrypted and non encrypted pages
But why is it still being requested twice


RE: Double requests for css - pmeenan - 06-04-2011 10:28 AM

Curious, never seen that before. It doesn't look like your test page has any structure to it (<html><head>, etc - just the css - could that be causing it as well?)


RE: Double requests for css - fritzelly - 06-05-2011 12:02 AM

No I just put that up to demonstrate the problem knowing that nothing else could be pulling in the css.
My actual page has everything etc. http://www.webpagetest.org/result/110603_ZH_RGFC/
Note its only the css file that is pulled twice, everything using this format (js, images etc) is only pulled once.


RE: Double requests for css - fritzelly - 06-05-2011 09:50 AM

I've actually change the code now so it uses the relevant address and now I have the coveted 6 A's


RE: Double requests for css - joe524 - 06-06-2011 12:27 AM

(06-04-2011 10:28 AM)pmeenan Wrote:  Curious, never seen that before. It doesn't look like your test page has any structure to it (<html><head>, etc - just the css - could that be causing it as well?)

Hi Pat,

Same thing here: http://www.webpagetest.org/result/110605_T8_RRV0/1/performance_optimization/#keep_alive_enabled

It shows two css in some runs and not in others.

I wonder if it has anything to do with CDN implementation. That's the only change I've added into site.

Best Regards,


RE: Double requests for css - prasath_ragavan - 06-06-2011 09:41 PM

(06-06-2011 12:27 AM)joe524 Wrote:  
(06-04-2011 10:28 AM)pmeenan Wrote:  Curious, never seen that before. It doesn't look like your test page has any structure to it (<html><head>, etc - just the css - could that be causing it as well?)

Hi Pat,

Same thing here: http://www.webpagetest.org/result/110605_T8_RRV0/1/performance_optimization/#keep_alive_enabled

It shows two css in some runs and not in others.

I wonder if it has anything to do with CDN implementation. That's the only change I've added into site.

Best Regards,

I just looked at the page and seems like http or https protocol is missing for the CSS.

<link rel="stylesheet" type="text/css" media="screen" href="//cdn.mod-page-speed.com/style.css">

"Internet Explorer 7 & 8 will download stylesheets twice if the http(s) protocol is missing"

You can see more info from Steve's blog post here - http://www.stevesouders.com/blog/2010/02/10/5a-missing-schema-double-download/


RE: Double requests for css - joe524 - 06-06-2011 09:53 PM

Thank you Prasath!

That is incredible as mod_pagespeed strips & rewrites those protocols. This is one for the books.

I'll make changes soon.

Regards,


RE: Double requests for css - fritzelly - 06-07-2011 01:15 AM

Great to know Prasath!