{
  "id": "09",
  "content": [
    {
      "type": "heading",
      "text": "Caching & Compression"
    },
    {
      "type": "text",
      "html": "Leverage browser caching and compress text assets."
    },
    {
      "type": "text",
      "html": "<pre><code>&lt;IfModule mod_expires.c&gt;\nExpiresActive On\nExpiresByType text/css \"access plus 1 year\"\nExpiresByType application/javascript \"access plus 1 year\"\nExpiresByType image/png \"access plus 1 year\"\n&lt;/IfModule&gt;\n\n# ETag/Cache-Control examples\n&lt;IfModule mod_headers.c&gt;\nHeader set Cache-Control \"public, max-age=31536000, immutable\"\n&lt;/IfModule&gt;\n\n# Compression (example for mod_deflate)\n&lt;IfModule mod_deflate.c&gt;\nAddOutputFilterByType DEFLATE text/plain text/html text/css application/javascript application/json\n&lt;/IfModule&gt;</code></pre>"
    }
  ],
  "quiz": {
    "questions": [
      {
        "id": "q1",
        "type": "single",
        "text": "Which module controls expiry rules?",
        "options": [
          {
            "id": "a",
            "text": "mod_expires"
          },
          {
            "id": "b",
            "text": "mod_status"
          },
          {
            "id": "c",
            "text": "mod_proxy"
          }
        ],
        "correct": [
          "a"
        ]
      },
      {
        "id": "q2",
        "type": "single",
        "text": "A good Cache-Control for static versioned assets is:",
        "options": [
          {
            "id": "a",
            "text": "no-store"
          },
          {
            "id": "b",
            "text": "public, max-age=31536000, immutable"
          },
          {
            "id": "c",
            "text": "private, max-age=0"
          }
        ],
        "correct": [
          "b"
        ]
      }
    ]
  }
}