CSS cache

This commit is contained in:
justuser-31 2026-02-03 19:43:07 +03:00
parent 402974eaf6
commit 7d5831dc74

View File

@ -550,6 +550,9 @@ class FileServerHandler(BaseHTTPRequestHandler):
if file_path.endswith(".css"): if file_path.endswith(".css"):
self.send_response(200) self.send_response(200)
self.send_header("Content-type", "text/css") self.send_header("Content-type", "text/css")
self.send_header(
"Cache-Control", "public, max-age=86400"
) # Cache in seconds (1 day)
self.end_headers() self.end_headers()
self.wfile.write(content.encode()) self.wfile.write(content.encode())
else: else: