我可以在 iOS 缓存清单中使用完整的 URL 吗?

Can I use full URLs in iOS cache manifest?

如果我使用 iOS Safari 的缓存清单来离线缓存页面,如果我使用完整的 URL,它是否仍然有效,例如

https://example.com/content/folder/image.jpg

在缓存文件中,或者我使用相对URLs?

document明确指出:

The URLs are file paths to resources you want to download and cache locally. The file paths should be relative to the location of the manifest file—similar to file paths used in CSS—or absolute.

所以应该是相对的URL.

但我还发现了一个旧的 link 上面写着

Resource URLs can be absolute or relative to the manifest file. Each URL must appear on a separate line.

您可能应该坚持使用最新文档并仅使用相对 URL。