MyBB Internal: One or more warnings occured. Please contact your administrator for assistance.
WebPagetest Forums - Double requests for css

WebPagetest Forums

Full Version: Double requests for css
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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...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
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?)
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.
I've actually change the code now so it uses the relevant address and now I have the coveted 6 A's
(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...ve_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,
(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...ve_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...-download/
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,
Great to know Prasath!
Reference URL's