Currently, when a page is not found, the dash user guide suggests passing a 404 as the app layout using the pathname callback.
However, in my opinion, this has a few problems:
- A http 200 status code is returned for the request, rather than a 404
- All the plotly/dash js/css is loaded by the client, just to show a 404 message - this consumes network bandwidth and puts extra load on the servers hosting the content (especially bad if hosting the content locally)
Is there anyway to pass a true 404 and skip loading all the css/js?
I’ve dug around editing the dash.Dash class but I couldn’t figure anything out.