Only Allow Geolocation Once

I have have script workflow initiated when a user presses a button to “getCurrentPosition” (Geolocation API - Web APIs | MDN) however, they have to allow location services almost every time (sometimes they don’t have to for hours but eventually will get prompted to allow location tracking).

Is there a solution to have an experience similar to a native app where the user has to allow only once?