3 ms·
Ask HN: How to display Different version of Same Website for Different Users
I was wondering if it's possible to create a website which acts like this :
Person X goes to example.com and sees one version
Person Y goes to example.com and sees another version of the site ( which might differ thematically or functionally as well ).
How easy or hard is it to achieve this? I know some websites use ISP information to redirect customers away (eg: Pandora) - but it's only a static webpage. Is it possible to have two fully functional sites running simultaneously for different sets of users?
- callmeed 16y agoThe big question is: what rules/logic are you using to show each version? Do you want it randomly displayed or based on some parameter?
- hardik988 16y agoWell, it could be as simple as modifying the theme based on the location - or even modifying functionality (say, provide extra features to people in particular regions).
- Travis 16y agoYou have access to a number of different data points -- cookies, IPs, language accept sets, etc. The difficult part is deciding what you want to pivot on. Also helps to know the limitations of each of those methods (e.g. IP addr isn't always accurate, especially not withing 15 miles or so, but it's decent at guessing countries).
- megamark16 16y agoExactly. You have access to quite a bit of information about the user when they make a request, so modifying the response based on any of that information is really very easy. IP address, cookies you set, browser type, there's lots of info stored in the request headers, you just have to decide what you want to look for and what you want to change.
- madhouse 16y agoOnce you can distinguish person X from person Y, showing something different is the easiest thing. And yes, it is of course possible to do what you want, once you can figure out who is visiting your site: X or Y? That's the harder part.