catching shiny app page reload on shinyapps.io when the instance is down

I would like to detect when users connect to my shiny app on shinyapps.io after doing a page reload / browser refresh.

I'm using this code in my shiny app to create a shiny reactive refreshed to be used later in the server logic:

# Catch refreshed page
  shinyjs::runjs("
    const pageAccessedByReload = window.performance.getEntriesByType('navigation')[0].type.includes('reload');
    Shiny.onInputChange('refreshed', pageAccessedByReload);
  ")

This works fine if the instance on the shinyapps server is already up and running.
However, when the user initiates the instance, a "Please Wait" message appears on screen and when the app is served, the navigation type is set to "reload" instead of "navigate".
This happens in two different browsers (Edge and Firefox), so it's probably not related to the browser, but to the way the instances are initiated when the first user connects to the shinyapps server.

Maybe someone here could suggest a workaround?

well it seems that when shinyapps.io initiates the instance, the value of
window.performance.getEntriesByType('navigation')[0].responseStart
is larger than 3 seconds.
That would give an indication that the instance is being initiated.
If someone has something better, I'm all ears ...