how to load confetti only one time for a user

I want to load the confetti at a specific time. After that time is passed or once the confetti is loaded for a user, I don’t want it to be seen again for that user when he refreshes the page or changes the page.

I used this code to run the confetty

<script src=""></script>


Consider using the Local Storage API. You can save values like this:

let firstTime = localStorage.getItem("confetti_loaded");

if (firstTime != 'yes') {
   // first time loaded!

Now this will load your confetti.min.js only 1 time then after no matter how many times user refresh the page if you wants to load js again simply remove the value that is store in local storage.