Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi , guys, is there any good way to display different content based on the latitude and longitude of the user browser?
I was thinking to load all the content for one page and then use JS to programmatically display part of them based on the navigator.geolocation.getCurrentPosition but this way introducing lots of hidden content.
Or in the page load, send the ajax request with the latitude and longitude info to Umbraco REST endpoint to get the content but this way may increase network traffic.
Is there any better way to do it ?
Depending on what you are building, I would suggest the second approach.
If you need to select a language, base it on what accept-language header. If you need to show “local news” use the lst/lng as you describe. Remember to always have a fallback, so you don’t end up having blank spots on your pages.
What kind of content do you actually want to add?
Have you seen this package https://our.umbraco.com/projects/website-utilities/personalisation-groups/
Perhaps this can help you doing what you are trying to archive
Hope this helps,
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted