WebPagetest Forums
Not Modified Content Downloading? - 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: Not Modified Content Downloading? (/showthread.php?tid=13543)

Not Modified Content Downloading? - freelancer-review.com - 02-17-2015 02:05 AM

I have a quick question regarding my test result:

I have a bunch of results in yellow.

HTTP/1.1 304 Not Modified
Cache-Control: no-cache
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
X-Powered-By-Plesk: PleskWin
Date: Mon, 16 Feb 2015 16:02:37 GMT

i can see that the request comes back as not modified.

Why is the download time over half a second for these requests?

I figured if they were not modified, then there would be no need to download them?

Thanks in advance!

RE: Not Modified Content Downloading? - pmeenan - 02-18-2015 06:42 AM

The long times look to me a measurement artifact in Chrome because it spans the 400ms of JS code running on DOM Content Loaded. Looking at the bytes in it doesn't look like it actually downloaded the files.

RE: Not Modified Content Downloading? - freelancer-review.com - 02-23-2015 08:34 AM


Thanks for the prompt response. You might remember me from awhile back; I was creating a website called green-watch.org but the project fell through. So here I am (round 2) trying to create a new business involving freelance programming. Last time I built a website for myself, I did not think twice about page speed until the website was practically developed. I am taking it more serious this time around and ever since then really for client websites.

I have moved most of the JavaScript to a body onload event.

1st Page Load: http://www.webpagetest.org/result/150222_ET_71b414d24f45d3d71da5f20e82e1fd9e/2/details/
2nd Load: http://www.webpagetest.org/result/150222_ET_71b414d24f45d3d71da5f20e82e1fd9e/8/details/

I have already used your tool to decrease my first page load from 1.9s to 0.6s and my second page load from 1.5s to 0.6s. However, I did take out a huge portion of the page, which will be loaded via AJAX here soon. The document complete time should not change, but I expect the full loaded time to increase a bit.

I have three questions below if you do not mind?

Question #1 - Does anybody know if Google looks at the overall load time vs only the document complete load time in determining SERP results? I realize that both are important (document load probably more so than overall load). If overall webpage load speed is taken into consideration, I might split my page up into sub-pages. With the additional content from AJAX it will be quite lengthy so I was thinking about having it load via AJAX gradually as the user scrolls down. I do not know how that would effect the SERPS though meaning the overall load time is based upon the user scrolling down. Anybody have any thoughts on this?

Question #2 - On the first page load (non-cached), I am using some inline css to partially render the most important elements on the webpage. On the body onload event, I am loading the rest of the CSS for the webpage. This CSS is then cached and served to the user in the HTML HEAD section on additional requests. This seemed to have increase my webpage speed a lot. The original CSS file was quite bloated. I used some critical CSS generator (http://jonassebastianohlsson.com/criticalpathcssgenerator/) to create the inline css for the initial webpage load. However, the Google Insight tool now warns me to "Prioritize Visible Content" and "only about 57% of the final above-the-fold content could be rendered with the full HTML response". Is there a better tool out there to extract the critical CSS? If not, want to make one for us hah =)

Question #3 - I am going to be working on reducing some images and making them lossless and then creating some sprites. I have not yet made the website dynamic so I expect the time to first byte to increase up to half a second. Most of the stuff that happens after document complete event will be third party plugins (like sharethis to get social network capabilities). I am not really sure how to go about reducing overall load time because of this. It is harder to control how things load on external servers. I just have the control of when they load really. Any advice on this?

Thanks for any advice!

Travis Walters

RE: Not Modified Content Downloading? - freelancer-review.com - 02-23-2015 06:10 PM

Hey There,

Question #1: Why would SSL negotiations take so long on cached pages? In fact, why would it even negotiate the first SSL request for a cached webpage?

HTTP/1.1 304 Not Modified
Cache-Control: max-age=7200
Content-Type: text/html;charset=UTF-8
Server: Microsoft-IIS/8.5
Set-Cookie: CFGLOBALS=urltoken%3DCFID%23%3D1875532%26CFTOKEN%23%3Dcca79d2984672dae%2D1612015​8%2DBACF%2D7BEE%2D200203FE62DB77B1%23lastvisit%3D%7Bts%20%272015%2D02%2D22%2023%​3A49%3A09%27%7D%23timecreated%3D%7Bts%20%272015%2D02%2D22%2023%3A48%3A49%27%7D%2​3hitcount%3D4%23cftoken%3Dcca79d2984672dae%2D16120158%2DBACF%2D7BEE%2D200203FE62​DB77B1%23cfid%3D1875532%23; Expires=Wed, 15-Feb-2045 07:49:09 GMT; Path=/
X-Powered-By: ASP.NET
X-Powered-By-Plesk: PleskWin
Date: Mon, 23 Feb 2015 07:49:09 GMT

Question #2 :

Why isn't the first request the actual webpage? Instead, it is a plugin I am using?

Question #3 : Why do some locations have a much higher TTFB compared to other locations?

TTFB is server processing from what I understand? I barely have any backend processing code right now so this is concerning.

I was a bit surprised China's average time was not higher.

Thanks again for any information.

Travis Walters

RE: Not Modified Content Downloading? - pmeenan - 02-24-2015 07:01 AM

For your css inlining question, there was a pretty good twitter thread on the tooling for extracting the critical css recently: https://twitter.com/lara_hogan/status/568885474934317056

For the cached pages question, if the client is asking and the server is responding with a 304 that means it is still doing a validation check and isn't truly cached in the browser (which is why the connection needs to be set up). As to why it takes so long, it looks like the CPU is pegged for some reason - I'd be more inclined to blame the EC2 instance though it does seem to happen pretty consistently on that test.

Those really long TTFB's are certainly server processing and getting visibility into that usually requires installing something like New Relic (or instrumenting the code). Coming in from China will add some network RTT to the TTFB but it's on the order of 250ms and is dwarfed by the server time.