Ignore:
Timestamp:
Oct 21, 2011 11:00:12 AM (13 years ago)
Author:
fenix
Message:

added cache header for csshover.htc view to allow proxy and browser to cache it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/css.py

    r1182 r3287  
    1313        resource = file(os.path.join(os.path.dirname(__file__), 
    1414                                     'resources', 'csshover.htc'), 'r').read() 
    15         self.request.response.setHeader('Content-Type', 'text/x-component') 
     15        response = self.request.response 
     16        response.setHeader('Content-Type', 'text/x-component') 
     17 
     18        # cache in browser for 1 year and in proxy for 2 month 
     19        response.setHeader('Cache-Control', 
     20                           'max-age=31536000, s-maxage=5184000, public') 
    1621        return resource 
Note: See TracChangeset for help on using the changeset viewer.