Edit this page

up.Response up.Response.prototype.isHTML()
Instance method

This feature is experimental. Please share your experiences so we know what to keep or change.

Returns whether the response has a content-type for HTML or XHTML.

This method tests if the Content-Type header is either text/html or application/xhtml+xml. It doesn't test if the response body actual contains a valid HTML document.


Return value

Whether the response has a HTML mime type.

boolean