that event is called by the browser itself when the url changes
Browser do it without javascript code from main index.js?
If your JS called to sent ajax response, maybe possible to add IDs on every ajaxhistory.AddHash('anyhash', true) event.
How i see possible solution (if browser use your javascript code) -
When ajaxhistory.AddHash executed, on server side we cat create new guid,
with ajax response we can send this guid to browser, that guid can be assigned to some variable on client side,
when url changed and browser send response, maybe we can add this guid to response?
Then on server side we simply can compare response guid with ignore list. If received id match with some item from ignore list, we can skip form refreshing (same time we should delete this id from server ignore list).
Ignore list can be simple private tstringlist property in ajaxhistory component.
Many words)