<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Browser on Jaehyun&#39;s Blog</title>
    <link>https://hongjae.pages.dev/tags/browser/</link>
    <description>Recent content in Browser on Jaehyun&#39;s Blog</description>
    <image>
      <title>Jaehyun&#39;s Blog</title>
      <url>https://pub-8eb6fdee382f4b0390e652016dc5f15a.r2.dev/og-image.jpg</url>
      <link>https://pub-8eb6fdee382f4b0390e652016dc5f15a.r2.dev/og-image.jpg</link>
    </image>
    <generator>Hugo -- 0.118.2</generator>
    <language>ko</language>
    <lastBuildDate>Thu, 02 Jul 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://hongjae.pages.dev/tags/browser/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>사용자가 페이지를 떠날 때 안정적으로 HTTP 요청 보내기</title>
      <link>https://hongjae.pages.dev/posts/260702-stable-http-request-on-page-exit/</link>
      <pubDate>Thu, 02 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://hongjae.pages.dev/posts/260702-stable-http-request-on-page-exit/</guid>
      <description>Navigator.sendBeacon() 사용하기 Navigator.sendBeacon() 함수는 페이지가 떠나갈 때 신뢰성 있게 데이터를 전송하기 위해 만들어진 API입니다. 간단히 말해, 작은 데이터 블록을 서버로 보내는 데 적합합니다.
기본 사용법은 다음과 같습니다.
navigator.sendBeacon(&amp;#39;/log&amp;#39;, JSON.stringify({ some: &amp;#39;data&amp;#39; })); 하지만 이 API는 커스텀 헤더를 지원하지 않으므로, Content-Type을 application/json으로 지정하고 싶다면 Blob 객체를 사용해야 합니다.
&amp;lt;a href=&amp;#34;/some-other-page&amp;#34; id=&amp;#34;link&amp;#34;&amp;gt;Go to Page&amp;lt;/a&amp;gt; &amp;lt;script&amp;gt; document.getElementById(&amp;#39;link&amp;#39;).addEventListener(&amp;#39;click&amp;#39;, (e) =&amp;gt; { const blob = new Blob([JSON.stringify({ some: &amp;#39;data&amp;#39; })], { type: &amp;#39;application/json; charset=UTF-8&amp;#39; }); navigator.</description>
    </item>
  </channel>
</rss>
