Is the Doctype HTML URL loaded by the client browser?

I am just wondering when I declare a Doctype, for example the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

Is strict.dtd read from http://www.w3.org/TR/html4/ or is it just used as an obscure identifier to tell the browser to use strict processing?

Perhaps the browser stores the contents of http://www.w3.org/TR/html4/ permanently locally?

+6
html doctype
source share
2 answers

Regular web browsers see Doctype as nothing more than a magic string for specifying standard mode or quirks mode. They do not treat URIs as URIs and never load DTDs. They don’t even use DTDs for parsing; instead, parsing-soup-parser is created.

Validating parsers load it if they don’t have a local copy that they can identify based on the PUBLIC identifier (the URI is the SYSTEM identifier). They should cache it, but they don’t do much, until the moment when the W3C block blocks most (if not all) of the DTD requests in the URIs specified in Doctypes - they cannot afford bandwidth.

+3
source share

This is an excerpt from the wikipedia page for "DTD"

Since web browsers are implemented using special HTML parsers, and not based on general purpose DTD parsers, they do not use DTDs and will never access them, even if the URL provided

+1
source share

All Articles