Some browsers supports HTTP 103 Early Hints (https://tools.ietf.org/html/rfc8297) allowing pushing assets before the downstream response:
```
HTTP/1.1 103 Early Hints
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script
HTTP/1.1 200 OK
Date: Fri, 26 May 2017 10:02:11 GMT
Content-Length: 1234
Content-Type: text/html; charset=utf-8
Link: </style.css>; rel=preload; as=style
Link: </script.js>; rel=preload; as=script
<!doctype html>
[... rest of the response body is omitted from the example ...]
``
Would be pretty neat to be able to create an Openresty module to cache typical assets for a path and automatically send a 103 with them. This is similar to HTTP/2 push, however, it respects browser caches without hacks and seemed more likely to work with OpenResty. However, I am having trouble using HTTP 1xx with OpenResty:
```
content_by_lua '
ngx.exit(ngx.HTTP_CONTINUE)
ngx.status = 200
ngx.say("hello")
ngx.exit(ngx.OK)
';
```
This example just hangs the client. I don't see anything useful in the error log. Another disadvantage with the `content_by_lua` approach is that I'd have to use `ngx.location.capture` to get the response, bypassing e.g. `balancer_by_lua`—so this is not ideal. Has anyone had success with this sort of thing?
Anyone's had success with pushing assets and respecting caches with OpenResty?