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
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,6 +144,7 @@ Note that this only lets you check whether an error "category" popped up. It can
144
144
|[`AmpRuntimeCss`](https://github.com/ampproject/amp-toolbox-php/blob/main/src/Optimizer/Transformer/AmpRuntimeCss.php)| Transformer adding `https://cdn.ampproject.org/v0.css` if server-side-rendering is applied (known by the presence of the `<style amp-runtime>` tag). AMP runtime css (`v0.css`) will always be inlined as it'll get automatically updated to the latest version once the AMP runtime has loaded. |
145
145
|[`PreloadHeroImage`](https://github.com/ampproject/amp-toolbox-php/blob/main/src/Optimizer/Transformer/PreloadHeroImage.php)| Transformer that optimizes image rendering times for hero images by adding preload and serverside-rendered `<img>` tags when possible. Viable hero images are `<amp-img>` tags, `<amp-video>` tags with a `poster` attribute as well as `<amp-iframe>` and `<amnp-video-iframe>` tags with a `placeholder` attribute. The first viable image that is encountered is used by default, but this behavior can be overridden by adding the `data-hero` attribute to a maximum of two images. The preloads only work work images that don't use `srcset`, as that is not supported as a preload in most browsers. The serverside-rendered image will not be created for `<amp-video>` tags. |
146
146
|[`ReorderHead`](https://github.com/ampproject/amp-toolbox-php/blob/main/src/Optimizer/Transformer/ReorderHead.php)| Transformer applying the head reordering transformations to the HTML input. `ReorderHead` reorders the children of `<head>`. Specifically, it orders the `<head>` like so:<br>(0) `<meta charset>` tag<br>(1) `<style amp-runtime>` (inserted by `AmpRuntimeCss`)<br>(2) remaining `<meta>` tags (those other than `<meta charset>`)<br>(3) AMP runtime `.js``<script>` tag<br>(4) AMP viewer runtime `.js``<script>`<br>(5) `<script>` tags that are render delaying<br>(6) `<script>` tags for remaining extensions<br>(7) `<link>` tag for favicons<br>(8) `<link>` tag for resource hints<br>(9) `<link rel=stylesheet>` tags before `<style amp-custom>`<br>(10) `<style amp-custom>`<br>(11) any other tags allowed in `<head>`<br>(12) AMP boilerplate (first `<style>` boilerplate, then `<noscript>`) |
147
+
|[`RewriteAmpUrls`](https://github.com/ampproject/amp-toolbox-php/blob/main/src/Optimizer/Transformer/RewriteAmpUrls.php)| Transformer that rewrites AMP runtime URLs to decide what version of the runtime to use. This allows you to do such things as switching to the LTS version or disabling ES modules.|
147
148
|[`ServerSideRendering`](https://github.com/ampproject/amp-toolbox-php/blob/main/src/Optimizer/Transformer/ServerSideRendering.php)| Transformer applying the server-side rendering transformations to the HTML input. This does immediately on the server what would normally be done on the client _after_ the runtime was downloaded and executed to process the DOM. As such, it allows for the removal of the boilerplate CSS that _hides_ the page while it has not yet been processed on the client, drastically improving time it takes for the First Contentful Paint (FCP).|
148
149
|[`TransformedIdentifier`](https://github.com/ampproject/amp-toolbox-php/blob/main/src/Optimizer/Transformer/TransformedIdentifier.php)| Transformer applying the transformed identifier transformations to the HTML input. This is what marks an AMP document as "already optimized", so that the AMP runtime does not need to process it anymore. |
0 commit comments