ampproject / ampproject/amp-toolbox-php

Optional Transformer: Elevate resource hints to header

Open
#176 9 comments 0 reactions 0 assignees View on GitHub
Optimizer
Dominant language
PHP
Stars
74
Forks
25
Avg merge
1d 15h
Merged PRs (30d)
3

Description

## Feature description

If we prepare a response in WP and the header has not yet been sent, we could run an additional transformer to elevate the resource hints (`` elements in head) to the header as `Link: ...` entries: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link

This would have these resource hints be active even when a URL from our origin is only sent as header for a prefetch.

This is done by the Amp package for signed exchanges: https://github.com/ampproject/amppackager/blob/cc38c5fad40fc603119a298700820b97a4f0c54f/transformer/transformer.go#L194

I'm unsure whether that would be the case and whether we'd actually profit from this.

---------------

_Do not alter or remove anything below. The following sections will be managed by moderators only._

## Acceptance criteria

*

## Implementation brief

*

## QA testing instructions

*

## Demo

*

## Changelog entry

*

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.