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 referer (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.

There is no path, only the apex domain.

How to manage Cookies in the Browser via Javascript?


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

Discover More
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...

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

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

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 (SECT)...
DOM - Document Loaded - onload event

The load event is an event that is fired / emitted on: an HTML element that fetch resources on the browser window when the page has finish loading. This event is a timing page load event To...

Share this page:
Follow us:
Task Runner