Cookie-free domain warning on content hosted on my wesbite

#1

I have been running a bunch of tests on GT Metrix and I am getting a warning about using a Cookie-free domain for 13 components, 7 or 8 of these are hosted on my website including my logo etc? Just wondering what i should do in order to serve these up from the cloudflare cookie-free domain? According to THIS article all the static content should go through cloudflare?
Any help would be much appreciated.

#2

First of all, cookies are no issue in this context.

Second, Cloudflare issues cookies for all traffic going through their proxies, so you cant avoid that.

Bottom line, ignore that “warning” :slight_smile:

#3

Thanks Sandro! Am new to all this, so just trying to wrap my head around it all.

#4

No worries. Some suggestions of GT Metrix can be useful, but some are also simply misleading.

#5

Yeah ok. If you don’t mind me asking, what tools do you use or recommend to get the most accurate reading/site speed score?

#6

I would not count too much on scores. If your site loads reasonably fast for you, you should be fine. Only concern might be how the server reacts under load, but that is something you cant determine with these scores either.

#7

TTFB might give some clue to that. Also if you’re running a VPS you might be able to run diagnostics.

Some of their metrics are very old school. Cookieless domains might speed up time but not perceptually.

@julian.connett if you’re very interested in cookieless domains I can post here how to do that. You’ll have to bypass cloudflare for static resources, but I can guide you to the same optimizations.

#8

Possibly, but TTFB might be great with a small number of connections and might suddenly go through the roof once there is load.

I really dont get where the notion comes from (or why they would suggest it in the first place) that cookies slow anything down.

#9

Cookies are sent from the client. That upload takes some time, even before page processing at the origin (it needs to read those cookies first).
If you have lots of cookies, or cookie data length is large, the wait is longer.
Probably immeasurable on decent connections. Poor/mobile connections might see some effect.

I think google tests dropped the metric only because of their user tracking.

#10

Cookies are just regular HTTP headers. Unless you save a gazillion cookies there wont be any difference in performance.

My guess is there complaint is because they assume these might be session cookies, which are typically of no relevance for static resources, but giving such a generalised advice for a very particular type of configuration is just bad advice. They really should drop that “warning”.

#11

Type A / Completionists like to see a perfect score. I’ve been there! It’s more of a nerd metric in the 21st century, with internet speeds making that extra data upload imperceivable. But just for geek edification:

Pingdom Website Speed Test still uses them as a metric.

When the browser requests a static image and sends cookies with the request, the server ignores the cookies. These cookies are unnecessary network traffic. To workaround this problem, make sure that static components are requested with cookie-free requests by creating a subdomain and hosting them there.

So does YSlow.

Serve static content from a different domain to avoid unnecessary cookie traffic.
When the browser requests a static image and sends cookies with the request, the server ignores the cookies. These cookies are unnecessary network traffic.

PageSpeed Insights / Lighthouse does not. Neither does WePageTest. But those are all Google related. They are into tracking users. They need cookies.

#12

I am sorry but their statements are - well, I’d like to avoid the R word :smile:

I will only refer back to the last paragraph in the my previous response :slight_smile:

#13

Really awesome”? :rofl:

#14

Precisely :smile:

youre-reading-my-mind

#15

you-can-read-minds-zoolander
Yes. Yes I can.

Making Wednesday, Funday.