How to store temporary cookie

I would like to ask how do I store a temporary/transient cookie and its only available to certain tab (cookie is not shared to other tabs).

I use put_session but it persists after tab closes and its shared with other tabs. Is there a function it Plug.Conn or something that I can use.

Reading through this post. It describes what I want to do

Session cookies are temporary; when you close your browser, your computer will automatically delete them all.

Cookies aren’t restricted to a particular tab. I believe Window.sessionStorage - Web APIs | MDN is what you’re after.