All articles

  1. Django - Setting Headers in your Response

    Today I found a interesting part in the Django Docs about set and remove of Headers in responses .

    response = HttpResponse()  # Created a HttpResponse
    response['Cache-Control'] = 'no-cache'  # Set Cache-Control Header
    del response['Cache-Control']  # Remove Cache-Control Header

    I know that should be do the web server like Apache but sometimes is it ...

« Page 2 / 2