You are, just not wittingly.
Have you considered just getting the high score value on the start of the layout, loading it as a variable, and if your user surpasses that value, update via the ajax call? (you could even check/retrieve it prior to a post if you wanted to get really picky)
I'm not super familiar with firebase's setup, but a stored value is a stored value.