Can You Remove Cookies From Static Resources When Using CloudFlare?

If you are a user of CloudFlare, like I am, you know what a content delivery network (CDN) can do to improve both the performance and the security of your website.

If you are one who loves to strive for the fastest load time possible, like me, then you might notice a common warning to “Remove Cookies From Static Resources”. Content like images, CSS, and JS files do not need to be serving cookies. By removing them you can shave a few bytes off your websites page weight.

Many CDN’s include this feature, such as MaxCDN, among others. However, CloudFlare does not and it does so for a very good reason. CloudFlare serves cookies for a variety of reasons. It does this primarily for its security features to work properly. Therefore, without these cookies most of the security benefits from CloudFlare would disappear.

Therefore, you are not able to remove these cookies. While most performance tools will recommend it as a benefit, what you are going to gain is minimal. For this reason, it is often times not worth doing in my opinion. But, it is also not a reason to avoid using CloudFlare. The performance benefits you receive when using the platform greatly outweigh the cookie issue.

TLDR: No, but it’s not necessary to make your site load quickly. It won’t make a difference either way. 

scott hartley

About the author

Scott is a web performance geek, lover of all things coffee, and avid video game player. His WordPress work delves into web performance, web security, and SEO.

Leave a Comment