Interactivity between HTML-file and Photon through Particle.functions and Particle.variables

I have a Photon application with some Particle variables and some Particle functions and I can perfectly interact with the Photon by using Particle console.
I intend however to use the system for monitoring some analog topics that I send once per hour to an HTML page.
As I do not want to use WiFi/Cloud connection permanently, the connection is activated and disactivated for about half a minute per hour by the application running on the Photon.
If I nevertheless occasionally want to connection to remain active, I have one Particle.function to prevent that the Photon application disconnects and another Particle.function that is used for switching the connection off manually.
Now this all works fine when applying both Particle.functions from the Particle console on my PC or from the iOS version of the console.

Now I want to do exactly the same thing from an HTML-file.
I defined some HTML-functions to read the distinct Particle variables using “.get(urlA, {access_token: accessToken}, callbackSTAT……."-statements. I activate these functions every 15 seconds from the HTML page (rather similar to what bko once documented in the tutorial: Reading Spark Variables with Your Own HTML File). That also works fine from the HTML page. Then I added the two HTML functions to control the Particle.functions that I've described above.. They are really very basic; not much more than: ".post(urlB, {params: message, access_token: accessToken……”-statements.
That does not work properly. You would expect that there is enough time in between the polling of the Particle variables as described above to allow for the Particle.functions to be handled. but in fact the timing of the mechanism is highly irregular: if you activate a Particle function from the HTML page, the Photon might respond immediately, or might react after “minutes”, or not at all.
Are there any precautions that I should take into account when sending Particle variables from within a HTML -file?

Not sure what that means?
You cannot send a Particle variable. Variables are registered by the device for collecting and you can request the current value of that variable remotely.

Sorry, the wording was rather inaccurate.
I am sending data (a message “1” or “0”) to the Particle.functions (so: not a variable!) from the HTML page using $.post(url…etc. and not more than that.
The Photon responds sometimes immediately, sometimes after minutes and sometimes not at all, while activating these very same Photon.functions from Particle console works fine.
Could it be that the way that the Photon handles “post” and “get”-requests may interfere somehow?
Is there some mechanism that I am unaware of, or are there any timing constraints or otherwise, that you should take into account in order to have the HTML page act similar to the Particle console?
Is there perhaps a way to prioritize Particle functions in such a way that they are given priority above all get-requests?

The console also just sends POST requests and doesn’t use any special magic to trigger functions.
Have you tried CLI to check how the latency is that way?
Is your device permanently on when you check latency?