Current time: 10-31-2020, 12:17 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Images TTFB very slow before render
08-07-2014, 05:49 AM
Post: #1
Images TTFB very slow before render
Hey guys,

I got this weird issue where images first byte is really really slow before the page render start.

You can see an example here: http://www.webpagetest.org/result/140806...1/details/


I can't understand how this is happening.

* We use cloudflare as a cdn
Find all posts by this user
Quote this message in a reply
08-07-2014, 10:44 PM
Post: #2
RE: Images TTFB very slow before render
Cloudflare supports SPDY (which is a very good thing) so the waterfalls might not look like you're used to seeing. With SPDY the browser can send requests for everything it needs all at once and then the server can deliver them as they become available (sometimes in parallel and with hints about priorities provided by the client).

When that happens you usually see a lot of requests all starting around the same time but taking different amounts of time for the responses as they get delivered over the connection.

If you look down at the bandwidth chart at the bottom of the waterfall you can see that it's completely pegged so they are basically delivering the images as fast as the connection allows for.

That said, there are a couple of things you should be aware of:

1 - Sharding domains is a bad idea with SPDY (static1 and static2). You're a lot better off just using a single domain. The current releases of all of the major browsers support SPDY (well, Safari in the fall with version 8): http://caniuse.com/spdy so it's probably best to optimize for that case given that it will still work fine for the non-SPDY case.

2 - When you get off of staging will your main server also go through cloudflare? If so then your best bet is to not have a separate static domain at all and serve everything from the same domain.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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