Cloudflare CDN not detected

My CDN, cloudflare, is not being detected, even tough I see a significant reduction since I enabled it in my 1and1 hosting.

What could be the reason?

Also, how can I optimize the TTFB? I’m using opencart with 3000 products.

I’m not that much of a CF fan - too much marketing hype for my liking. Whatever happens, they aren’t going to be able to reliably cache any dynamic content that you’re generating, just the static files the page needs: css, js, images, and so on. The html needs to be generated and delivered by your server, not theirs. So to improve your TTFB, it needs tuning, sizing correctly, and (less of a problem unless you’re in New Zealand like me!) locating near your target audience. I’d revert to a pure CDN rather than this half CDN/half proxy that CF seem to offer.

I’m considering using Pagespeed service by Google, in their test, they reduce the loading time for my website in a half. So far it’s free but they say that they will eventually charge for the service.

Anyone has any reference about this service, or any idea how much will they charge in the future for this?

If you would post a link to the test result, or to the site itself, we folks who volunteer to help might be able to give better answers to what problems you are experiencing. Without knowing your WPT testing parameters there is no way to give you intelligent responses.

However as already stated here - CloudFlare isn’t any kind of CDN answer and in my experience with it, really doesn’t do much at all. It won’t and can’t cure inherent problems with your host, and it can’t optimize a site that isn’t optimized already. It is dependent on your host. And when CF is down (which is often) your site is also down.

I used CF for two years and never got first byte time improved until I dumped CF and optimized my site. Now I don’t use any kind of CDN and my sites are greasy fast and score straight A grades on any WPT test from any location.

Thanks for your response, the history file for my last test is http://www.webpagetest.org/result/140512_WP_GK/

I didn’t know that if CF is down your site will down with them! That’s not good at all.

[quote=“Pierceb, post:5, topic:8719”]
Thanks for your response, the history file for my last test is http://www.webpagetest.org/result/140512_WP_GK/

I didn’t know that if CF is down your site will down with them! That’s not good at all.
[/quote]And it happened quite often, in my 2 year experience with it. Additionally, they claim that if your host goes down, your site will still be up due to their serving of cached pages. Patently false - when your host is down CloudFlare loads a page telling everyone the site is down and advising the site owner to check with the host.

RE: Your site, which I web page tested HERE, the first thing I suggest is you get rid of the custom font files which are fully 5 percent of your pageload. Most browsers ignore the custom fonts anyway, but they load on the user/visitors computer regardless.

You have 140 requests for 1.8 megabytes. Images account for 43% of it, javascript accounts for 23%. This page is FAT.

You can trim 230kb of fat off this site by optimizing the following JPEG images:FAILED (15.8 KB) - http://limonbay.com/image/cache/data/product/Dilatador_acero__506de137f12c7-200x200.jpg FAILED (13.4 KB) - http://limonbay.com/image/cache/data/product/Dilatador_acero__506dece5106c5-200x200.jpg FAILED (13.1 KB) - http://limonbay.com/image/cache/data/product/Taper_dilatador__4f120dd63812b-200x200.jpg FAILED (13.0 KB) - http://limonbay.com/image/data/bt_ebuy/plataforma-ing.jpg FAILED (11.2 KB) - http://limonbay.com/image/cache/data/product/oreja/tunel/FFAN-200x200.jpg FAILED (11.0 KB) - http://limonbay.com/image/data/product/tel/banner_col_3.jpg FAILED (10.6 KB) - http://limonbay.com/image/cache/data/product/ombligo/HOTDL076-200x200.jpg FAILED (10.1 KB) - http://limonbay.com/image/data/bt_ebuy/banner_col_5.jpg Info (9.7 KB) - http://limonbay.com/image/cache/data/product/Dilatador_de_acr_506c5b44e55a5-130x130.jpg Info (9.6 KB) - http://limonbay.com/image/data/bt_ebuy/banner_col_4.jpg Info (9.4 KB) - http://limonbay.com/image/cache/data/product/complementos/Moviles/tapon-tel-movil-gatito-1-200x200.jpg Info (9.1 KB) - http://limonbay.com/image/cache/data/product/Piercing_lengua__51a3c9221c9cc-200x200.jpg Info (9.0 KB) - http://limonbay.com/image/cache/data/product/complementos/Moviles/tapon-movil-gatita-chi-ronroneando2-200x200.jpg Info (8.7 KB) - http://limonbay.com/image/cache/data/product/Barra_de_metal_c_504baef7d0612-200x200.jpg Info (8.6 KB) - http://limonbay.com/image/cache/data/product/complementos/Moviles/tapon-movil-gatita-chi-feliz-200x200.jpg Info (8.1 KB) - http://limonbay.com/image/cache/data/product/complementos/Moviles/tapon-tel-movil-conejito-1-200x200.jpg Info (7.4 KB) - http://limonbay.com/image/cache/data/product/oreja/plug/JFTN04b-170x145.jpg Info (7.1 KB) - http://limonbay.com/image/cache/data/product/falsos/UHU05b-170x145.jpg Info (6.8 KB) - http://limonbay.com/image/cache/data/product/Barbell_anodizad_504884d755e9b-130x130.jpg Info (6.6 KB) - http://limonbay.com/image/cache/data/product/complementos/Moviles/tapon-tel-movil-cerdito-1-200x200.jpg Info (6.1 KB) - http://limonbay.com/image/cache/data/product/complementos/Moviles/tapon-movil-gato-durmiendo-boca-abajo-200x200.jpg Info (6.0 KB) - http://limonbay.com/image/cache/data/product/Dilatador_de_acr_506c58c883904-130x130.jpg Info (5.8 KB) - http://limonbay.com/image/cache/data/product/oreja/tunel/FFAN-130x130.jpg Info (4.8 KB) - http://limonbay.com/image/cache/data/product/Piercing_ombligo_5198fbb5442f2-130x130.jpg Info (4.4 KB) - http://limonbay.com/image/cache/data/product/Barra_piercing_d_519fd7e39d258-200x200.jpg Info (3.4 KB) - http://limonbay.com/image/cache/data/product/Taper_dilatador__52aa3b0e83efd-108x74.jpg Info (3.3 KB) - http://limonbay.com/image/cache/data/product/Piercing_de_ceja_52ae17c71d8bd-108x74.jpg Info (3.2 KB) - http://limonbay.com/image/cache/data/product/ombligo/piercing-ombligo-atrapasuenos-categoria-170x145.jpg Info (2.9 KB) - http://limonbay.com/image/cache/data/product/Piercing_de_ombl_51a7cb9890f18-130x130.jpg Info (2.9 KB) - http://limonbay.com/image/cache/data/product/labio/PTW02c-108x74.jpg Info (2.7 KB) - http://limonbay.com/image/cache/data/product/nariz/Piercing-de-lengua-categoria-170x145.jpg Info (2.7 KB) - http://limonbay.com/image/cache/data/product/Bolas_con_rayas__519146c100a10-108x74.jpg Info (2.6 KB) - http://limonbay.com/image/cache/data/product/Retenedor__retai_51f8e4839b5c7-108x74.jpg Info (2.5 KB) - http://limonbay.com/image/cache/data/product/Labret_acero_qui_519fd2a3a37a3-108x74.jpg Info (2.4 KB) - http://limonbay.com/image/cache/data/product/Piercing_abierto_518f74ce0336e-108x74.jpg Info (2.2 KB) - http://limonbay.com/image/cache/data/product/labio/JCSB01b-108x74.jpg Info (2.1 KB) - http://limonbay.com/image/cache/data/product/1._Piercing_de_c_51b20ca2dbd96-108x74.jpg Info (2.1 KB) - http://limonbay.com/image/cache/data/product/labio/BCR20-108x74.jpg

Additionally, http://www.limonbay.com/favicon.icoIs throwing a 404 not found error.

The WPT IS detecting CloudFlare, but apparently it is not working properly.CDN's Used: www.limonbay.com : Cloudflare fonts.googleapis.com : Google www.paypal.com : Akamai themes.googleusercontent.com : Google www.google-analytics.com : Google

You should apply GZip compression to the following, to shave another 500+ kb off the pageload:[code]Use gzip compression for transferring compressable responses: 31/100

762.9 KB total in compressible text, target size = 241.1 KB - potential savings = 521.8 KB

FAILED - (205.9 KB, compressed = 52.0 KB - savings of 153.9 KB) - http://limonbay.com/catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js
FAILED - (92.0 KB, compressed = 32.7 KB - savings of 59.3 KB) - http://limonbay.com/catalog/view/javascript/jquery/jquery-1.7.1.min.js
FAILED - (73.2 KB, compressed = 14.8 KB - savings of 58.4 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/stylesheet.css
FAILED - (55.3 KB, compressed = 11.3 KB - savings of 44.0 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/boss_revolutionslider/jquery.themepunch.revolution.min.js
FAILED - (47.0 KB, compressed = 13.7 KB - savings of 33.4 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/fancybox/jquery.fancybox.js
FAILED - (33.1 KB, compressed = 6.3 KB - savings of 26.8 KB) - http://limonbay.com/catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css
FAILED - (35.6 KB, compressed = 14.2 KB - savings of 21.4 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/jquery.carouFredSel-6.2.0-packed.js
FAILED - (25.0 KB, compressed = 4.7 KB - savings of 20.3 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/boss_revolutionslider/css/settings.css
FAILED - (19.3 KB, compressed = 1.8 KB - savings of 17.5 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/unsemantic/unsemantic-grid-tablet.css
FAILED - (21.4 KB, compressed = 4.4 KB - savings of 17.0 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/font-awesome.css
FAILED - (19.0 KB, compressed = 4.7 KB - savings of 14.3 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/responsive.css
FAILED - (17.2 KB, compressed = 6.3 KB - savings of 10.9 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/boss_revolutionslider/jquery.themepunch.plugins.min.js
FAILED - (12.5 KB, compressed = 3.1 KB - savings of 9.4 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/boss_megamenu.css
FAILED - (11.9 KB, compressed = 3.5 KB - savings of 8.3 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/bossthemes.js
FAILED - (8.4 KB, compressed = 1.9 KB - savings of 6.5 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/owl.carousel.css
FAILED - (7.4 KB, compressed = 2.5 KB - savings of 5.0 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/jquery.smoothscroll.js
FAILED - (5.0 KB, compressed = 1.8 KB - savings of 3.2 KB) - http://limonbay.com/catalog/view/javascript/common.js
FAILED - (4.5 KB, compressed = 1.6 KB - savings of 2.9 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/fancybox/jquery.fancybox.css
FAILED - (3.3 KB, compressed = 1.2 KB - savings of 2.1 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/boss_carousel.css
FAILED - (3.6 KB, compressed = 1.6 KB - savings of 2.0 KB) - http://limonbay.com/catalog/view/javascript/jquery.lazyload.min.js
FAILED - (3.0 KB, compressed = 1.0 KB - savings of 1.9 KB) - http://limonbay.com/catalog/view/theme/bt_ebuy/stylesheet/bossthemes/unsemantic/unsemantic-grid-base.css
FAILED - (3.6 KB, compressed = 1.7 KB - savings of 1.9 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/notify.js
FAILED - (2.6 KB, compressed = 1.2 KB - savings of 1.4 KB) - http://limonbay.com/catalog/view/javascript/bossthemes/boss_filterproduct/boss_filterproduct.js[/code]

Once you have done all of this, test further to see if any first byte time and backend processing improvement is achieved. In my experience, it usually is. If not, then we can explore further, ways to improve this.

Did you contact us about the issues? We cover TTFB in a few places on our site. TTFB is not the only metric you should be using.

" By definition cloudflare will add some first byte time since it needs to go back to your server and process the data but it should be minimal. My algorithm for calculating a first byte time grade doesn’t play nicely with something like cloudflare though so look at the before/after first byte times and compare those directly (doesn’t explain the one long time you had in a repeat view though).

The algorithm for first byte time looks at the socket connect time to get an estimate of the round trip time to a server and then it uses a multiple of that as the baseline and adds 100ms for each letter.

Since cloudflare has distributed edge nodes, they actually make your socket connect time a LOT faster than if the browser had to go back to the original server directly so the baseline is lowered. The actual request still needs to travel back to your server though so it can’t be any faster than it was before (and will usually be slightly slower). The effect that has is that it will lower the grade even if it is actually faster because the round trip time used for the baseline is faster"

Also, it looks like the cloudflare detection worked correctly. The problem is that the vast majority of the resources are on different domains from what you’re hosting on cloudflare: http://www.webpagetest.org/result/140512_WP_GK/1/performance_optimization/#use_of_cdn

Most notably the naked vs www version of your domains. If you get the config squared away things should get a bit better (though not related to the first byte time).

That 2+ second TTFB is not the kind of thing you usually see as being a problem with cloudflare itself. Usually that’s from the origin server though it could be an interaction of some kind if you have IP-based rate limiting at the origin.

+1 to daemoncloudflare’s comments. Just ping their support guys to figure out what’s going on. Anton also had a lot of good optimization advice.

[quote=“damoncloudflare, post:7, topic:8719”]
Did you contact us about the issues? [/quote]Of course. It wasn’t helpful with the CF down time which occurred frequently, and the canned excuse making on TTFB was a turnoff. I was very patient, I gave the service two years. I’m not a fan. [quote]TTFB is not the only metric you should be using.[/quote]And, it’s not. Downtime is another. Lousy customer service is another. Should I go on?

Well, I have finally reduced my website size in a 70% getting very good results. Thanks for your advice!

But the TTFB increased a lot: 22 seconds!

http://www.webpagetest.org/result/140518_ZJ_HZA/

How can I optimize the website now everything is reduced to make it faster? Thanks!

[quote=“Pierceb, post:10, topic:8719”][size=xx-small]
Well, I have finally reduced my website size in a 70% getting very good results. Thanks for your advice!

But the TTFB increased a lot: 22 seconds!

http://www.webpagetest.org/result/140518_ZJ_HZA/

How can I optimize the website now everything is reduced to make it faster? Thanks![/size]
[/quote]Perhaps for the test parameters you used when running that one test? I am testing you HERE with much better FBT results. I also re-ran your same test scenario and had alot better TTFB there too.

And for whatever reason, you’re still showing to be hosted by cloudflare.URL: http://www.limonbay.com/ Host: www.limonbay.com IP: 108.162.197.36 Location: Cloudflare Error/Status Code: 200 Client Port: 4118 Start Offset: 0.177 s DNS Lookup: 81 ms Initial Connection: 96 ms Time to First Byte: 22033 ms Content Download: 225 ms Bytes In (downloaded): 36.5 KB Bytes Out (uploaded): 0.4 KB

You still have the custom font files slowing you down, and still have 140 requests. You have trimmed the total KB load of the site down about 25% though, but not anything like the 70% you seem to believe. You were 1.8MB before, you are 1.3MB now.

You’re still leaving over 250kb of fat on, via un-optimized images as well.

You’re off to a good start and seeing improvement, keep it up!

Hi, thanks for your insights.

I have used a server in Amsterdam for my test (much closer to Spain, where my public is) than those in US, so the TTFB should have been better. And this is something bothers me, If I run the same test again 10 minutes later maybe the TTFB is 2 seconds, and if I run it again it is 45 seconds, it looks more like a random thing than a objective measure.

I suspect it could be because of the shared hosting in 1&1 and their server load at any given time, but if it’s that it’s a bit discouraging as I could be loosing traffic randomly for this reason.

I will keep optimizing, thanks for the guidance and inspiration!

[quote=“Pierceb, post:12, topic:8719”]
Hi, thanks for your insights.

I have used a server in Amsterdam for my test (much closer to Spain, where my public is) than those in US, so the TTFB should have been better. And this is something bothers me, If I run the same test again 10 minutes later maybe the TTFB is 2 seconds, and if I run it again it is 45 seconds, it looks more like a random thing than a objective measure.

I suspect it could be because of the shared hosting in 1&1 and their server load at any given time, but if it’s that it’s a bit discouraging as I could be loosing traffic randomly for this reason.

I will keep optimizing, thanks for the guidance and inspiration!
[/quote]This is all too typical of shared hosting because most shared machines are oversold, overcrowded, under monitored and under serviced.

BUT - this is why you optimize FIRST, because it is also typical of shared hosting providers to blame YOU for the issues. They will do as I have, pointing to the fat page, the 140 requests, the tons of images, the lack of image and file optimization, the use of custom font files, etc. They will even blame Cloudflare, saying, “Well see? Your site is not even hosted with us!”

Well, Finally I got 4 “A” and improving! (test: http://www.webpagetest.org/performance_optimization.php?test=140520_T1_12DP&run=1&cached=0)

Even tough WPT says I can compress some images, the GTmetrix tool and YSmushit says they are already compressed to maximum! Is there any way to compress them more or should I leave them like that?

I always get an F in progressive jpg. How can I implement it in my site? Will this make a difference?
I already use Lazy load for the images.

And the TTFB thing is giving random responses but more stable, under 10 seconds.

I have removed Google fonts and it looks better!

[quote=“Pierceb, post:14, topic:8719”]
Well, Finally I got 4 “A” and improving! (test: http://www.webpagetest.org/performance_optimization.php?test=140520_T1_12DP&run=1&cached=0)

Even tough WPT says I can compress some images, the GTmetrix tool and YSmushit says they are already compressed to maximum! Is there any way to compress them more or should I leave them like that?

I always get an F in progressive jpg. How can I implement it in my site? Will this make a difference?
I already use Lazy load for the images.
[/quote]http://www.webpagetest.org/pageimages.php?test=140520_T1_12DP&run=1&cached=0

This is all of your images. Where it says “Not Progressive - Analyze JPEG” and shows there can be savings? Click on that and WPT gives you the optimized images. There’s no need to use another utility.

Example, call # 50 - use third image they show you there. Rename to match, upload to overwrite.

Do this for all such you see, from the link i gave earlier.

Great improvements! I have put the favicon, compress the images (I cannot compress more without suffering visible quality loss), and redirect non www to www (via .htaccess).
http://www.webpagetest.org/result/140521_5B_12VY/

Now I have to think about remodeling the website so it needs less images than now.

And the TTFB issue, always there. Any suggestion is welcomed!

TTFB is largely going to be a function of your hosting. If you’re on inexpensive shared hosting then that’s pretty much the norm (not a good thing). You can try to reach out to the hosting provider to see if there is anything they can do but more often than not the right answer is to switch hosts but that can be pretty painful.

You may be able to jump through some hoops on the php side by caching database queries. It looks like there are some opencart caching extensions that you might be able to use: http://www.opencart.com/index.php?route=extension/extension&filter_search=cache but they’d still just be hiding the underlying issue.

Note however Patrick, how much just reducing the load and optimizing images has improved first byte time? Alot.

To the OP: CloudFlare ADDS time to the TTFB, it does not subtract. It is also a point of contention with your host, if you try to get it to address the slow first response. They like to say “But you’re not even hosted here!” To tell you the truth, your TTFB isn’t all that bad now considering you are on shared hosting and loading 1MB. Changing hosts is a big pain in the ass and I don’t recommend it personally unless the hosting you’re on is simply untenable.

You’ve improved drastically over when we started working on this. Very commendable, nicely done.

Here’s how you look on IE10, which is the standard I optimize to:

http://www.webpagetest.org/result/140522_BG_P3X/

You can still reduce load and increase speed by getting rid of the custom font files which load anyway, regardless of the fact that most browsers totally ignore these. It’s 10% of your total page load that really does nothing for you.

This image displayed below is 14% smaller in file size than you are using, and there is NO visible decrease in quality:

You are right on the cusp of that magical 1MB figure for total page load… Good work!

Thanks Anton, I have just changed the image for the one you suggested!

I have tell the template not to use google fonts but it’s own. Can you tell me where do you see I’m using google fonts and their weight? I guess if I can find them I also can eliminate them gladly.

This template was 2,65Mb at the beginning, it’s such an amazing change in the good direction!

The fonts, images, 1MB of the page, etc have absolutely nothing to do with the first byte time. Yes, they are critical for the overall performance but the first byte time is the php code in opencart executing and building up the HTML that it is going to send to the browser. Most of the other content can load in parallel and basically competes for bandwidth but the browser can’t do anything until it gets the HTML so the TTFB is 100% blocking.

Depends on what your goals are but 1.8s is really slow. Most “fast” sites actually load the full page in that amount of time and have first byte times in the 200-300ms range. There’s still other things that can be done to make the front-end faster but the floor on your performance is going to be the server time for the TTFB.