Speculation Rules API: Interactive Prefetch Playground
Prompt
Create an interactive playground that demonstrates the Speculation Rules API for prefetching and prerendering pages. Include toggleable rules (prefetch/prerender), visual feedback (hover detection, fetch status), and a simulation of rule application with a list of example URLs and their statuses. Use a modern design with subtle animations.
CODE PREVIEW
AIとの対話に追加する一言
プロンプトと一緒にコピーして、AIがより正確に意図を汲み取れるようにします
このコードをそのまま使いたいので、CDNリンクも含めた完全なHTMLファイルとして出力してください。
初心者なので、各行にコメントを追加して、何をしているか説明してください。
このコードをWordPressのテーマに組み込む方法も教えてください。
動作確認済みのコードをお願いします。エラーが出る場合の対処法も含めて。
Speculation Rules APIを使用した先読み(prefetch)とプリレンダリング(prerender)のインタラクティブプレイグラウンドです。prefetchとprerenderモードを切り替えて、サンプルURLセットに対して先読みルールがどのように動作するかを確認できます。各URLアイテムは現在の先読み状態を視覚的に表示し、アクティビティログですべての操作を追跡します。
Prompt Overview
An interactive playground to explore the Speculation Rules API for prefetching and prerendering web pages. Toggle between prefetch and prerender modes to see how speculation rules would behave on a sample set of URLs. Each URL item shows its current speculation status with visual feedback, and an activity log tracks all operations.
Was this prompt helpful?
Comments
Comments appear after moderation
この記事が役に立ったら投げ銭で応援
Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済
開発者が選ぶ最強ツール集
運営者が毎日使っているツール・ガジェット 6選