Beispiel #1
0
 def apply_hack_to_avoid_problems_with_caching(self):
     if hasattr(self.js_context.document.head, 'childNodes'):
         for element in self.js_context.document.head.childNodes.values():
             if hasattr(element, 'src') and element.src:
                 url = extend_querystring(element.src, {'query_id': random_hash()[:5]})
                 element.src = url
             elif hasattr(element, 'href') and element.href:
                 url = extend_querystring(element.href, {'query_id': random_hash()[:5]})
                 element.href = url
         return False
Beispiel #2
0
 def resource_request_cb(self, view, frame, resource, request, response):
     uri = request.get_property('uri')
     uri = extend_querystring(uri, {'instance': self.widget_ref().instance_id})
     request.set_property('uri', uri)