I have this code that shows alert when it\'s 30 minutes before event in calendar but I want to show it only once when user comes to page (in that 30min). Now it shows on eve
Set a cookie when you show the alert. Then, if the cookie is set, you will know not to show the alert again. If it is not set, you know that you haven't shown the alert yet and should do so now.
You can read about setting cookies in JavaScript here.