I need to modify the hash, remove it after certain processing takes place so that if the user refreshes they do not cause the process to run again.
This works fine
We had the same problem.
In our case it consisted of a http URL which was redirected to https by Apache. Since the string after the hash sign is never passed to the server, it got lost.