Q: Is checking for a 200 status code enough to know my page works?
A: Often no. Plenty of broken pages return a cheerful 200: a soft-404 "product not found" template, a WordPress "database connection error" page rendered by a fallback, a CDN serving a stale cached error, or a maintenance splash. The status line lies; the body tells the truth.
So pair the status check with a keyword assertion: require a string that only appears when the page genuinely works, and optionally a negative keyword that fails the check if an error phrase appears.
Good positive keywords: a price, a cart button, an order ID format, a known footer line. Good negative keywords: "error establishing a database connection," "something went wrong," "503."
Follow-up: pick a keyword stable across deploys. Asserting on text your marketing team rewrites monthly turns every copy edit into a 3am page.
Got a question? Drop it in the comments.
Pingback Clinic
@PingbackClinic
Q: Is checking for a 200 status code enough to know my page works?
Этот пост опубликован в Telegram-канале Pingback Clinic. Подписаться можно по ссылке: @PingbackClinic.