Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. The Power of AI: Mass Collaboration(cppdepend.com)
    discuss
  2. Show HN: DeutschDNA – German Tutor Skill for Claude Code and Codex(github.com/ahmtsahin)
    discuss
  3. Show HN: Busbar self-hosted execution boundary for Agentic Apps(github.com/getbusbar)
    discuss
  4. Show HN: Whiteboard (YC W26) – an open-source IDE for thoughtful software design(github.com/devdotfast)
    discuss
  5. Show HN: Devc – an alternate CLI for launching devcontainers(github.com/rameshvarun)
    discuss
  6. Open AI in the Wild: Adoption and Adaptation of Open Models on R/LocalLLaMA(acm.org)
    discuss
  7. Return-to-office policy in 2026: 8 of 75 top UK employers require 5 office days(wfhjobs.co.uk)
    1comments
  8. Paper2agent Turns Static Papers into Live AI Tools(ieee.org)
    discuss
  9. 35 years ago I did it all myself(twitter.com/jasonfried)
    discuss
  10. For Computer Use, the harness matters as much as the model(stagehand.dev)
    2comments
  11. Meta employees don't like to be filmed with there own glasses [video](youtube.com)
    discuss
  12. Show HN: Guardmcp – I scanned the official MCP registry with a config scanner(github.com/berkantacun)
    discuss
  13. Developer ported Word for Windows 1.1a from 1990 to run natively on Windows 11(neowin.net)
    discuss
  14. Does Georgism Work? Five Years Later(astralcodexten.com)
    discuss
  15. "Antedisciplinary" Science (2005)(plos.org)
    discuss
  16. Why does a Nix store path survive garbage collection?(labcraft.dev)
    discuss
  17. Show HN: ThimbleDb, an encrypted lightweight low latency open source database(github.com/jason-doyle)
    discuss
  18. We Have Named Arguments at Home(corrode.dev)
    1comments
  19. OpenRouter: Server Tools Marketplace(openrouter.ai)
    discuss
  20. Shared Memory for Coding Agents(getbelay.vercel.app)
    discuss
  21. Lifestreams: A storage model for personal data: ACM SIGMOD Record: Vol 25, No 1(acm.org)
    discuss
  22. US plan for 90 day diesel export ban could have significant impact on Europe(politico.eu)
    1comments
  23. Open OCI spec for agent sandboxes(linux.com)
    discuss
  24. LLMs can write tool workflows. Will they choose to?(github.com/kukushko)
    discuss
  25. The International AI Race May Not Be Won by the Smartest AI(phroneses.com)
    discuss
  26. S.F. Democratic Party stands behind Flock surveillance cameras in vote(missionlocal.org)
    12comments
  27. Gemini 3.8 Live with Live Avatar(blog.google)
    discuss
  28. One day of AI reading: 5.7M crawler reads of a 60M-company index, by engine(engagemii.com)
    discuss
  29. The Download: a bid to scrap the virtual wall and AI hits Climate Week(technologyreview.com)
    discuss
  30. Pinocchio, make copilot agents real by giving them memory(github.com/chiedo)
    discuss

QR codes that route to the appropriate app store

15 pointsby 1h agomatthuggins.com
9 comments
42m agoHN ↗

Is this a whole blog post for a simple backend that just routes based on the User-Agent?

40m agoHN ↗

I thought it was something clever, but it shows as URL in QR Scanner, not an APP, which opens browser after activating it, then user would have to confirm redirect to App Store on empty page

TL;DR: it is HTTP redirect based on User-Agent header

39m agoHN ↗

it's just a server side redirect based on the user agent headers

35m agoHN ↗

Err wut... redirecting based on user agents?

20m agoHN ↗

For our apps Slyp and SlypBusiness, we had the same QR code for each app open Playstore/Appstore page of the app depending on the phone. Hopefully, we will start rolling out Slyp next week.

Just have a branded link (like https://slyp.app/Slyp or https://slyp.app/SlypBusiness) to the official web page and have the js in that page open the original Playstore/Appstore page.

And yes, we used userAgent for identifying the platform.

If anyone is interested, here is the code

    window.addEventListener('DOMContentLoaded', (event) => {
        let app = 'Slyp'

        var userAgent = navigator.userAgent.toLowerCase();
        if (userAgent.indexOf('android') > -1) {
          window.location.href = `https://play.google.com/store/apps/details?id=com.ndcurve.${app}`;
        } else if (userAgent.indexOf('iphone') > -1 || userAgent.indexOf('ipod') > -1 || userAgent.indexOf('ipad') > -1 || userAgent.indexOf('mac') > -1) {
              if (app === "Slyp")
                window.location.href = 'https://apps.apple.com/app/<app_id>';
              else if (app === "SlypBusiness")
                window.location.href = 'https://apps.apple.com/app/<app_id>';
              else
                window.location.href = 'https://slyp.app';
        } else {
          window.location.href = `https://play.google.com/store/apps/details?id=com.ndcurve.${app}`;
        }
    });
16m agoHN ↗

I agree with the other commenters that this is a pretty simple engineering problem, but I still enjoyed reading about edge cases the author worked to address (they could have taken the easy road with this but tried not to). I forgot that Safari on iPad doesn't specify iPad in user agent headers