Skip to main content
Settings
Search
Appearance
Theme Mode
About
Jekyll v3.10.0
Environment Production
Last Build
2026-05-13 03:14 UTC
Current Environment Production
Build Time May 13, 03:14
Jekyll v3.10.0
Build env (JEKYLL_ENV) production
Quick Links
Page Location
Page Info
Layout default
Collection docs
Path _docs/jekyll/jekyll-performance-optimization.md
URL /docs/jekyll-performance-optimization/
Date 2019-06-28
Theme Skin
SVG Backgrounds
Layer Opacity
0.6
0.04
0.08

Jekyll - Performance Optimization

By Amr

Estimated reading time: 1 minutes

Performance.

Why Use Cookie-Free Domains?

Although cookies are very useful in some cases, in other cases - such as the delivery of static content, they can hinder performance. When a browser makes a request for a static asset such as an image or CSS file, there is no need for it to also send a cookie to the server. This only creates additional network traffic and since the files are static (they do not change) the server has no use for the added cookie.

When you use cookie-free domains you are able to separate the content that doesn’t require cookies from the content that does. This helps improve your site’s performance by eliminating unneeded network traffic.

Testing

image

2. Cache Header

Create netlify.toml

[build]
  command = "jekyll build"
  publish = "_site/"

[[headers]]
  for = "/assets/images/*"
  [headers.values]
    Cache-Control = "public, s-max-age=604800"
[[headers]]
  for = "/assets/css/*.css"
  [headers.values]
    Cache-Control = "public, s-max-age=604800"
[[headers]]
  for = "/assets/js/*.js"
  [headers.values]
    Cache-Control = "public, s-max-age=604800"

3. Reference