ampproject / ampproject/amp.dev

<amp-script> sample: why fetch requires an absolute URL

Open
#3,643 8 comments 0 reactions 2 assignees Claimed by @morsssss View on GitHub
Category: Documentation P1: High
Dominant language
HTML
Stars
600
Forks
675
PR merge metrics
No merged PRs in 30d

Description

#3588 🐛 Documentation question

This isn't really a bug report, but something in the `` sample which I've not heard before - and I'm wondering whether it's correct.

The text reads:

"As amp-script code is executed inside a web worker, fetch only works with absolute URLs."

Is that the reason why absolute URLs are required? I haven't seen anything about this with `fetch` in Workers. It could still be the case. Otherwise, I imagine AMP requires absolute URLs for the same reason it always does: what if your page is served from a cache?

@sebastianbenz , hoping you can answer this one!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.