I have a webpage dynamically created via Python. Its purpose is to provide images, so the first line sets the content type:
Content-Type: image/png
I would like to set http headers, specifically cache controlling, but I’m not too sure how as the content type is not html, so I’m sure I cant put html style headers into it.
EDIT: The code starts simply:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import string, sys, math, os
print("Content-Type: image/png\n")
Cache-Control, Content-Type and the like are HTTP headers, not “html style headers”. You can use them regardless of the content-type.