Current time: 12-10-2019, 05:09 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Double requests for css
06-04-2011, 10:01 AM (This post was last modified: 06-04-2011 10:08 AM by fritzelly.)
Post: #1
Double requests for css
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
Find all posts by this user
Quote this message in a reply
06-04-2011, 10:28 AM
Post: #2
RE: Double requests for css
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?)
Visit this user's website Find all posts by this user
Quote this message in a reply
06-05-2011, 12:02 AM (This post was last modified: 06-05-2011 12:53 AM by fritzelly.)
Post: #3
RE: Double requests for css
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.
Find all posts by this user
Quote this message in a reply
06-05-2011, 09:50 AM
Post: #4
RE: Double requests for css
I've actually change the code now so it uses the relevant address and now I have the coveted 6 A's
Find all posts by this user
Quote this message in a reply
06-06-2011, 12:27 AM
Post: #5
RE: Double requests for css
(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,

Joe
Visit this user's website Find all posts by this user
Quote this message in a reply
06-06-2011, 09:41 PM
Post: #6
RE: Double requests for css
(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/
Find all posts by this user
Quote this message in a reply
06-06-2011, 09:53 PM
Post: #7
RE: Double requests for css
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,

Joe
Visit this user's website Find all posts by this user
Quote this message in a reply
06-07-2011, 01:15 AM
Post: #8
RE: Double requests for css
Great to know Prasath!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)