將印刷 QR code 的目的地視為網頁發布合約
Treat printed QR destinations as a web release contract
印刷 QR code 的團隊應把編碼網址視為網頁發布合約,因為印刷後更改 CMS 路徑不會更新實體卡片上的目的地。每次印刷前記錄解碼後的網址、預定目的地、負責人及連結退役時機,並使用可維護且不依賴易變活動文案或 CMS slug 的 HTTPS 網址。發布前後以 GET 檢查重新導向,並用手機掃描實體或等比例樣稿完成預期任務;把已印刷網址納入檢查清單,保留舊路由以便回復。
A QR code on a card can outlive the landing page it points to. Once the card is printed, changing a route in the CMS does not update the destination in anyone’s pocket. Treat that encoded URL as a small public interface, not incidental artwork.
Record the contract before printing
For each print run, record the exact decoded URL, its intended final destination, a named owner and the point at which the link can be retired. Use an HTTPS URL a team can maintain. Keep the encoded path independent of campaign copy or a CMS slug likely to change. Print a short human-readable address too, so the journey is not scan-only.
For example, a synthetic stall might print https://example.com/card and send it to /collections/weekend. Before changing the collection’s slug, test the printed URL itself. Opening the new route directly does not verify the original journey.
Check the chain, then the task
Use a GET request to see how the redirect behaves, rather than assuming the server handles HEAD identically:
curl -sS -L --max-redirs 5 -o /dev/null \
-w '%{http_code} %{url_effective}\n' https://example.com/card
Replace the example with a URL you control. Check the final host, path and response. Then scan from a real printed or test-sized proof on a phone and complete the expected task. Test the typed fallback too. A successful status does not establish that the intended form, product or collection is present.
Keep the check in the release
Place the known printed URLs in a small launch checklist. If a deploy changes their destination, agree the expected final result, test it after release and retain the prior routing so a bad change can be reversed. Check retiring links against the oldest material still in use, not just this month’s artwork.
AI was used to draft this guide and generate the conceptual cover. The example is synthetic.
來源:DEV Community · dev.to