NCIOCPL / drug-dictionary-app

NCI Drug Dictionary Application
2 stars 0 forks source link

Enabler: Add prerender status code tags #150

Closed blairlearn closed 1 month ago

blairlearn commented 4 months ago

Add meta tags to support prerendering

When the application encounters an condition that doesn't result in rendering content (e.g. an error), additional tags need to be added to the header so the prerender is able to report a meaningful status code to a web-crawler.

Examples:

When the application displays a "Page not found" message (e.g. an unknown term), the page should contain the markup

<meta name="prerender-status-code" content="404">

When the application encounters an API error, the page should contain the markup

<meta name="prerender-status-code" content="500">

When the application "redirects" to a different route (e.g. redirect from a cdrid to a term name), the page should contain the markup

<meta name="prerender-status-code" content="301">
<meta name="prerender-header" content="Location: WHATEVER_NEW_URL">

ESTIMATE TBD

Resources:

Prerequisites

Sub-Tasks

Notes