​​React​Page Visibility API,Playwright,sendBeacon,TypeScript,useEffectEvent

Thumbnail of post image 090

記事をどこまで読んだかなどのアクセス解析のデータを、ページを閉じたり別のページへ移ったりする直前にサーバーへ送る方法です。React のフックの中で visibilitychange イベントを受け、navigator.sendBea ...