A network device, comprising: a memory (316, 332, 328) configured to be capable of storing instructions; a network interface configured to be capable of receiving and transmitting content over a network (108, 109); and one or more processors that are configured to be capable of executing the instructions stored in the memory (316, 332, 328) to perform actions, including: receiving from a client device (102, 103, 104), a request for web content; providing to the client device (102, 103, 104) at least one test using malformed HyperText Markup Language (HTML) content, wherein the malformed HTML content is HTML content that deviates from an HTML specification; receiving one or more responses to the provided at least one test from the client device (102, 103, 104); using the one or more responses to determine a classification of one of a web browser or a layout engine in use by the client device (102, 103, 104), wherein the determined classification is based on how a document parser component in the web browser or the layout engine responded to the at least one test; and using the determined classification to provide the requested web content in a format useable by the classified web browser or layout engine. a memory (316, 332, 328) configured to be capable of storing instructions; a network interface configured to be capable of receiving and transmitting content over a network (108, 109); and one or more processors that are configured to be capable of executing the instructions stored in the memory (316, 332, 328) to perform actions, including: receiving from a client device (102, 103, 104), a request for web content; providing to the client device (102, 103, 104) at least one test using malformed HyperText Markup Language (HTML) content, wherein the malformed HTML content is HTML content that deviates from an HTML specification; receiving one or more responses to the provided at least one test from the client device (102, 103, 104); using the one or more responses to determine a classification of one of a web browser or a layout engine in use by the client device (102, 103, 104), wherein the determined classification is based on how a document parser component in the web browser or the layout engine responded to the at least one test; and using the determined classification to provide the requested web content in a format useable by the classified web browser or layout engine. receiving from a client device (102, 103, 104), a request for web content; providing to the client device (102, 103, 104) at least one test using malformed HyperText Markup Language (HTML) content, wherein the malformed HTML content is HTML content that deviates from an HTML specification; receiving one or more responses to the provided at least one test from the client device (102, 103, 104); using the one or more responses to determine a classification of one of a web browser or a layout engine in use by the client device (102, 103, 104), wherein the determined classification is based on how a document parser component in the web browser or the layout engine responded to the at least one test; and using the determined classification to provide the requested web content in a format useable by the classified web browser or layout engine.