comparison roundup/cgi/client.py @ 6546:c58c7cd31243

issue2550991 - Some mechanism to set expiration header or max age for static resources Work was done in 2.0.0 to add support for cache control headers. This checkin sets default values for javascript (2 weeks) and css (2 month) files.
author John Rouillard <rouilj@ieee.org>
date Thu, 09 Dec 2021 17:36:08 -0500
parents 9aa8df0b4426
children de5f5f9c02f2
comparison
equal deleted inserted replaced
6545:5a3a386aa8e7 6546:c58c7cd31243
338 338
339 # Cache_Control[key] = Cache-Control header value 339 # Cache_Control[key] = Cache-Control header value
340 # Key can be explicitly file basename - value applied to just that file 340 # Key can be explicitly file basename - value applied to just that file
341 # takes precedence over mime type. 341 # takes precedence over mime type.
342 # Key can be mime type - all files of that mimetype will get the value 342 # Key can be mime type - all files of that mimetype will get the value
343 Cache_Control = {} 343 Cache_Control = {
344 'application/javascript': "public, max-age=1209600", # 2 weeks
345 'text/css': "public, max-age=4838400", # 8 weeks/2 months
346 }
344 347
345 # list of valid http compression (Content-Encoding) algorithms 348 # list of valid http compression (Content-Encoding) algorithms
346 # we have available 349 # we have available
347 compressors = [] 350 compressors = []
348 try: 351 try:

Roundup Issue Tracker: http://roundup-tracker.org/