Hasty Briefsbeta

双语

QR codes that route to the appropriate app store

4 hours ago
  • Business cards use a QR code pointing to a short URL (go.pokernexus.com/app) that redirects to different stores or website based on device, enabling a single printed link.
  • Short URL keeps QR code low-density for reliable scanning at business card size; logo in center uses error correction level H (30% recoverable).
  • Server is a standalone Hono app with a simple routing table: '/' goes to website, '/app' selects destination via User-Agent (iOS→App Store, Android→Play Store, else website).
  • Bot detection is prioritized first to prevent cloaking; iPad Safari desktop-mode falls back to website (website has app badges).
  • Uses 302 temporary redirects and 'Vary: User-Agent' header to allow future link changes and proper caching behavior.
  • Query strings are forwarded only to the website; for stores they are dropped to avoid overwriting essential parameters like package ID.
  • Separate subdomain (go.pokernexus.com) is used to prevent installed apps from intercepting links, and the service is isolated from the main website for independent deployment.
  • Unknown paths return 404 to catch typos early; tests use real user-agent strings and check that App Store ID and Android package ID match the application source.