You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
In #281 I'm parsing the HTML string from context.response.body, then transform it, then write it back to context.response.body. Great.
For #153 I would benefit from having access to the parsed response HTML, because I could then walk over the AST, find all a elements, and add their hrefs to the link header to enable pre-fetching.
In #122 I would benefit from having access to the parsed response HTML, because I could then walk over the AST, find all meta elements, and add some of them to the response headers.
Therefore, I propose the creation of a new parse-response-html step, a context.response.hast property and a new stringif-response-html step for the HTML pipeline.
The text was updated successfully, but these errors were encountered:
please ensure that the parse->stringify preserves whitespace and comments (at least in debug mode). developers don't like it, when their HTML gets scrambled :-)
HTML response bodies will now be parsed and then serialized before the final response is created. This creates the opportunity of changing the HTML AST for HTML-post-processing
Fixes#285
# [1.10.0](v1.9.2...v1.10.0) (2019-04-30)
### Bug Fixes
* **package:** update @adobe/helix-shared to version 0.10.5 ([54709a9](54709a9))
* **static:** change extension from .esi to .esi ([a936918](a936918))
### Features
* **html:** enable HAST parsing and serialization of HTML responses ([224c665](224c665)), closes [#285](#285)
* **html:** rewrite relative asset references to ESI resources ([dce696e](dce696e)), closes [#267](#267)
* **html:** rewrite static asset references to ESI includes that provide stable URLs ([aa2538f](aa2538f)), closes [#224](#224)
In #281 I'm parsing the HTML string from
context.response.body
, then transform it, then write it back tocontext.response.body
. Great.For #153 I would benefit from having access to the parsed response HTML, because I could then walk over the AST, find all
a
elements, and add theirhref
s to thelink
header to enable pre-fetching.In #122 I would benefit from having access to the parsed response HTML, because I could then walk over the AST, find all
meta
elements, and add some of them to the response headers.Therefore, I propose the creation of a new
parse-response-html
step, acontext.response.hast
property and a newstringif-response-html
step for the HTML pipeline.The text was updated successfully, but these errors were encountered: