The way exists, it is the HTML5 History API.
It needs JavaScript and HTML5 compliant browsers, or a javascript fallback for old IE (eg History.js).
Take a look at history.replaceState()
and history.pushState()
methods: the first alter the current history entry, the second adds a new one (creating noise in back button usage, so I suggest the first).
To remove the QueryString (the ?param1=value1¶m2=value2
part) just run this script on page load:
<script>
$(function(){
history.replaceState("","",location.href.substring(0,location.href.indexOf("?")));
});
</script>
While this client-side solution definitely improves clearness and eye candy, I doubt it improves security at all; Post-Redirect-Get would be better, but if you can't, then use this technique.
I generally use PRG in conjunction with this to achieve pretty URLs, and it works perfectly.
Note that this is a simulated PRG, an F5 after the page is loaded might have unpredictable behaviors according to how you've programmed your application.