Use cookie-free domains in Opencart - YSlow recommendation

802 Views Asked by At

I'm trying to optimize my website speed according to Google Speed Test and GTMetrix YSlow. One of the recommendation is to "use cookie-free domains", there are 12 components that are not cookie-free.

The 12 components are images and some CSS and JS files.

What is the problem and how to fix it?

2

There are 2 best solutions below

2
GrahamTheDev On BEST ANSWER

Cookie free domains relates to having domains that send a cookie with every request.

Say for example you serve all of your images from your main domain and your main domain has cookies on it.

Every one of those images will have a cookie sent with the request for the file, which the server ignores anyway.

This is completely unnecessary traffic as the cookie serves no purpose.

To fix this either use a cookie free CDN or set up a sub domain on your server that has no cookies.

Then serve all of your static assets such as fonts, images, JS and CSS from this sub domain / CDN.

1
Mujahid Bhoraniya On

[100% Working]

One of my website I installed NitroPack IO - Performance & SEO Booster Extension.

Download Free Extension Here

Before install Extension my website score in Mobile : 27 Desktop : 32

After install Extension score in Mobile : 98 Desktop : 99

I really appreciate this extension and his review is almost very good.