Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Adrian Wu 53 posts 266 karma points
    Aug 16, 2018 @ 20:28
    Adrian Wu

    dynamic content depending of the geographic location of browser ?

    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 ?



  • Søren Gregersen 441 posts 1883 karma points MVP 2x c-trib
    Aug 16, 2018 @ 21:48
    Søren Gregersen


    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.

    HTH, Søren

  • Greg Hluska 25 posts 133 karma points
    Aug 17, 2018 @ 04:13
    Greg Hluska

    What kind of content do you actually want to add?

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Aug 17, 2018 @ 05:48
    Dennis Aaen

    Hi Adrian

    Have you seen this package

    Perhaps this can help you doing what you are trying to archive

    Hope this helps,


Please Sign in or register to post replies

Write your reply to: