DOM - Document (Object)

DOM - Document (Object)


Every XML doc and HTML document (Web page) in an HTML UA is represented by a Document object.

A document in the context of a browser is generally a HTML document (Web Page).

The Document interface is the entry point to the whole DOM tree.

In a browser, it represents the whole web page.

A Document is created (the creation of the DOM):



The document's address is an absolute URL that is initially set when the Document is created but that can change during the lifetime of the Document, for example when the user navigates to a fragment identifier on the page or when the pushState() method is called with a new URL.


The document . referrer returns the address of the Document (an absolute URL) from which the user navigated. If it is not explicitly set, then its value is the empty string.

Browser - Cookie


See Web - Timeline of a page load (Page Speed|Page Latency)


  • HTML,
  • XML,
  • SVG,

With the Javascript document variable

type = document.contentType;
console.log("The document type is ("+type+")");



Each Document object has a reload override flag that is originally unset. The flag is set by the and document.write() methods in certain situations.

Documentation / Reference

Recommended Pages
Cookie Devtool
Browser - Cookie

HTTP cookies management in the client side (browser) via javascript. Cookie are one way to store data in the browser. document.cookie is a property of the browser document that returns the HTTP cookies...
Browser - Document variable (DOM) - Javascript

In a browser, the document is: a DOM document (in-memory tree) of a XML document (generally a HTML dom document) The document is provided by the browser via its DOM webapi (Not by the Javascript...
CSS - Style Sheet (Script|File) - Stylesheet

A stylesheet is a list of rules that specify the presentation of a source document. The stylesheet is a combination of : the external files with the suffix css defined via the HTML link element the...
DOM - (Node) Tree

The DOM presents an (XML|HTML) document as a tree-structure. A DOM has a standard tree structure, where each node contains one of the components from an XML structure. Generally, the vast majority of...

API The DOM API is a specification that specifies all classes and function to manipulate the DOM tree. The DOM API is present natively in browser and may be implemented via a library in other application/environment....
DOM - Body

The body node in the DOM tree represents the HTML body element. You access the body node via the document node as property. Example: getComputedcomputed style value Document/body
DOM - Document Fragment

DOM - Document Fragment The DocumentFragment is a minimal document object that has no parent. Example: * HTML template * Svg document
DOM - Element

An element is the most common type of node in the DOM. When you want to do something to an element, first you need to select it. A dom element is generally the memory representation of: an HTML element...
Devtool Chrome Event Listener
DOM - Event

This section is the management of action in the Document object model (ie in the browser) An event allows for signaling that something has occurred, e.g., that an image has completed downloading. Event...
DOM - HTML vs XML document

HTML The DOM specification gives the distinction between this two type of document: XML documents (ie XHTML) and HTML documents. HTML elements are rarely nested. In a XML file, the subsection...

Share this page:
Follow us:
Task Runner