Ticket #6195: i18js_caching.patch

File i18js_caching.patch, 592 bytes (added by jdetaeye, 17 years ago)

simple patch

  • django/views/i18n.py

     
    178178    src.extend(csrc)
    179179    src.append(LibFoot)
    180180    src.append(InterPolate)
    181     src = ''.join(src)
    182     return http.HttpResponse(src, 'text/javascript')
     181
     182    # Create response, and set the HTTP header to allow caching for 1 day by the client browser
     183    response = http.HttpResponse(''.join(src), 'text/javascript')
     184    response['Cache-Control'] = 'max-age=86400'
     185    return response
Back to Top