In the 'Themes and other settings' (dialog titled 'Other Properties') for a VP there is a setting called 'Run Command After Startup'. The note below the setting says:
"This command will run after the visual perspective has been shown."
Thus whenever the VP is loaded the command should be run.
And indeed, whenever the webpage is loaded (and the VP is loaded) this command runs.
HOWEVER, when a VP is subsequently loaded in the ordinary course of using the application after the web page has been loaded, this command is not run.
This the case at least for when the command to be run after a VP is shown is a Process, though I suspect it applies to any type of command.
It does not matter if a VP is loaded using DISPLAY PERSPECTIVE in a process, or if it is loaded via a Button or Menu Option assigned the action 'Home Page' or 'Change Perspective'.
Bottom line: Only when a VP is loaded by way of the webpage itself being loaded or reloaded does 'Run Command After Startup' command get run, whereas you would think it would get run whenever the VP is loaded irrespective of how it came about being loaded or reloaded.
LMK if a bug and I will edit this post and attach a bsv.