delayed-js.h2.py (442B)
1 import importlib 2 3 utils = importlib.import_module("loading.early-hints.resources.utils") 4 5 6 def main(request, response): 7 id = request.GET.first(b"id") 8 # Wait until the id is set via resume-delayed-js.h2.py. 9 utils.wait_for_preload_to_finish(request, id) 10 11 headers = [ 12 ("Content-Type", "text/javascript"), 13 ("Cache-Control", "max-age=600"), 14 ] 15 body = "/*empty script*/" 16 return (200, "OK"), headers, body