I have a web server that serves web page content depending on URL search parameters. So for example if i want a page containing customer information for customer 123, i would go to the following URL: https://example.com/mypage?userid=123 and the server would return the correct page for this user.
What my problem is that I got a requirement that we cannot show these user ids in the URLs in the browser after the page has been loaded.
So I tried to use the history API in the browser with javascript and replace state and just chop off the query part. But then the consequence would be that going back and forth in history would return wrong page since the query parameters are stripped from history. Is there any good way to solve this without major changes on the server to not take in the parameters in the query part of the URL?
Any suggestion is appreciated.
Aucun commentaire:
Enregistrer un commentaire