demo · v136

Speculation rules tag

Add a tag field to a speculation rules block and Chrome forwards it on the wire as Sec-Speculation-Tags. Use it on the CDN/edge to count or differentiate prerender hits per ruleset.

Probing…

generated JSON



    
rules-supported?
prerender statedocument.prerendering = false

candidate link (hover to attempt prerender)

/v136/regexp-escape/

the code

<script type="speculationrules">
{
  "prerender": [{
    "source": "list",
    "urls": ["/v136/regexp-escape/"],
    "tag": "cps-demo-prerender"
  }]
}
</script>

// On the wire:
//   Sec-Speculation-Tags: "cps-demo-prerender"

see also