4 ms·
I have implemented pages that circumvent that detail with AJAX. var hash = window.location.hash.substr(1); Then you just quietly: $.ajax( "example.php?h
by digeridew 10y ago
I have implemented pages that circumvent that detail with AJAX.
var hash = window.location.hash.substr(1);
Then you just quietly:
$.ajax( "example.php?hash=" + hash );
No one will ever notice the difference without inspecting their network traffic, and docile, agreeable users will gaze reassuringly at the anchor, and lull themselves to sleep, feeling placated by the presence of the warm glow of the # character in their address bar.
Here, see for yourself:
data:text/html,<script>alert(window.location.hash.substr(1))</script>#because+anchors+are+always+safe
Paste that into your address bar, and witness the simplicity.
- fao_ 10y ago> Of course, there's nothing stopping some sneaky JS that runs later from reading the data and sending it back through another channel, but that's another story. Already covered :P
- Terr_ 10y ago> No one will ever notice the difference without inspecting their network traffic, Which I did, when checking out the app. It's why I mentioned it as a possibility.