{"id":2480,"date":"2024-10-03T12:29:49","date_gmt":"2024-10-03T11:29:49","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=2480"},"modified":"2024-10-03T16:33:59","modified_gmt":"2024-10-03T15:33:59","slug":"browser-object-model","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/","title":{"rendered":"JavaScript Browser BOM: A Comprehensive Guide"},"content":{"rendered":"\n<p>JavaScript is known for its versatility in web development, and one of its powerful features is its ability to interact with the browser through the <strong>Browser Object Model (BOM)<\/strong>. While the <strong>Document Object Model (DOM)<\/strong> allows JavaScript to manipulate HTML elements, the BOM provides the capability to interact with the browser environment itself.<\/p>\n\n\n\n<p>In this article, we will explore the essentials of the JavaScript Browser BOM, its key components, and how it enhances web development by enabling communication between JavaScript and the browser.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What Is the Browser Object Model (BOM)?<\/h3>\n\n\n\n<p>The <strong>Browser Object Model (BOM)<\/strong> refers to the collection of objects that JavaScript can use to interact with the web browser. Unlike the DOM, which focuses on the structure of a web page, the BOM provides methods and properties that allow developers to control the browser environment, such as managing browser windows, handling URLs, and retrieving information about the user&#8217;s screen or location.<\/p>\n\n\n\n<p>Since the BOM is not part of the official JavaScript specification, its features can vary slightly between browsers. However, most modern browsers support the common elements of the BOM, making it a vital tool for building interactive web applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Key Components of the BOM<\/strong><\/h3>\n\n\n\n<p>The Browser Object Model consists of several key objects that allow interaction with different aspects of the browser. The most important of these objects include <code>window<\/code>, <code>navigator<\/code>, <code>screen<\/code>, <code>location<\/code>, and <code>history<\/code>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">1. The <code>window<\/code> Object<\/h4>\n\n\n\n<p>The <code>window<\/code> object is the core of the BOM and represents the browser window or tab in which the web page is displayed. It is the global object in the browser, meaning all other BOM objects are properties of <code>window<\/code>.<\/p>\n\n\n\n<p>Some key functionalities of the <code>window<\/code> object include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Managing windows<\/strong>: You can use methods like <code>window.open()<\/code> to open new browser windows or tabs, and <code>window.close()<\/code> to close them.<\/li>\n\n\n\n<li><strong>Dialog boxes<\/strong>: The <code>window<\/code> object provides methods such as <code>alert()<\/code>, <code>confirm()<\/code>, and <code>prompt()<\/code> to display dialog boxes.<\/li>\n\n\n\n<li><strong>Timers<\/strong>: You can use <code>window.setTimeout()<\/code> and <code>window.setInterval()<\/code> to execute code after a delay or repeatedly at specified intervals.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\/\/ Display an alert box\nwindow.alert(\"Welcome to the JavaScript BOM!\");\n\n\/\/ Open a new window\nlet newWindow = window.open(\"https:\/\/example.com\", \"_blank\");\n\n\/\/ Close the new window after 5 seconds\nsetTimeout(() =&gt; newWindow.close(), 5000);\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. The <code>navigator<\/code> Object<\/h4>\n\n\n\n<p>The <code>navigator<\/code> object provides information about the browser and the device the user is running. This object is useful for detecting the user\u2019s browser, determining whether cookies are enabled, and accessing geolocation services.<\/p>\n\n\n\n<p>Some commonly used properties and methods include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>navigator.userAgent<\/code>: Returns a string describing the browser and operating system.<\/li>\n\n\n\n<li><code>navigator.language<\/code>: Returns the language preference of the user.<\/li>\n\n\n\n<li><code>navigator.geolocation<\/code>: Provides access to the user\u2019s geographical location through methods like <code>getCurrentPosition()<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\/\/ Get browser information\nconsole.log(navigator.userAgent);\n\n\/\/ Check if cookies are enabled\nif (navigator.cookieEnabled) {\n    console.log(\"Cookies are enabled.\");\n}\n\n\/\/ Get the user's geolocation (with permission)\nnavigator.geolocation.getCurrentPosition(function(position) {\n    console.log(`Latitude: ${position.coords.latitude}, Longitude: ${position.coords.longitude}`);\n});\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. The <code>screen<\/code> Object<\/h4>\n\n\n\n<p>The <code>screen<\/code> object contains information about the user&#8217;s screen, such as its width, height, and color depth. This can be useful for optimizing the display of content based on the user&#8217;s screen size.<\/p>\n\n\n\n<p>Some important properties of the <code>screen<\/code> object include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>screen.width<\/code> and <code>screen.height<\/code>: Returns the width and height of the screen.<\/li>\n\n\n\n<li><code>screen.availWidth<\/code> and <code>screen.availHeight<\/code>: Returns the available screen width and height, excluding interface elements like the taskbar.<\/li>\n\n\n\n<li><code>screen.colorDepth<\/code>: Returns the color depth of the screen in bits.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\/\/ Display screen dimensions\nconsole.log(`Screen width: ${screen.width}, Screen height: ${screen.height}`);\n\n\/\/ Display available screen space\nconsole.log(`Available screen width: ${screen.availWidth}, Available screen height: ${screen.availHeight}`);\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. The <code>location<\/code> Object<\/h4>\n\n\n\n<p>The <code>location<\/code> object represents the URL of the current webpage and allows developers to get and set different parts of the URL, such as the protocol, hostname, and path. You can also use the <code>location<\/code> object to redirect the user to a new page or reload the current page.<\/p>\n\n\n\n<p>Some useful properties and methods include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>location.href<\/code>: Returns the entire URL of the current page.<\/li>\n\n\n\n<li><code>location.reload()<\/code>: Reloads the current page.<\/li>\n\n\n\n<li><code>location.assign()<\/code>: Loads a new document.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\/\/ Get the current page URL\nconsole.log(location.href);\n\n\/\/ Redirect to another page\nlocation.assign(\"https:\/\/example.com\");\n\n\/\/ Reload the current page\nlocation.reload();\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">5. The <code>history<\/code> Object<\/h4>\n\n\n\n<p>The <code>history<\/code> object allows JavaScript to interact with the browser\u2019s session history, which is the list of pages the user has visited in the current session. You can use the <code>history<\/code> object to navigate back and forth between pages.<\/p>\n\n\n\n<p>Some key methods include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>history.back()<\/code>: Navigates to the previous page.<\/li>\n\n\n\n<li><code>history.forward()<\/code>: Navigates to the next page.<\/li>\n\n\n\n<li><code>history.go()<\/code>: Navigates to a specific point in the session history.<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">\/\/ Go back to the previous page\nhistory.back();\n\n\/\/ Move forward to the next page\nhistory.forward();\n\n\/\/ Go two pages back in history\nhistory.go(-2);\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Practical Use Cases of the BOM<\/strong><\/h3>\n\n\n\n<p>The Browser Object Model can be extremely useful in creating dynamic and interactive web applications. Here are some practical use cases:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Geolocation-based services<\/strong>: Use the <code>navigator.geolocation<\/code> API to provide location-based features like showing the nearest store, weather updates, or localized content.<\/li>\n\n\n\n<li><strong>Browser detection<\/strong>: Use the <code>navigator<\/code> object to detect the browser and tailor the user experience accordingly, such as adjusting styles or functionality for specific browsers.<\/li>\n\n\n\n<li><strong>Custom page navigation<\/strong>: Use the <code>history<\/code> object to allow users to navigate through custom routes in single-page applications (SPAs) without reloading the entire page.<\/li>\n\n\n\n<li><strong>Dynamic URLs<\/strong>: Manipulate the <code>location<\/code> object to create dynamic URLs based on user input, enabling seamless page redirection or query string updates.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h3>\n\n\n\n<p>The <strong>Browser Object Model (BOM)<\/strong> provides developers with the tools to interact with the browser and its environment beyond manipulating HTML elements through the DOM. By using objects like <code>window<\/code>, <code>navigator<\/code>, <code>screen<\/code>, <code>location<\/code>, and <code>history<\/code>, JavaScript can control browser windows, manage URLs, detect browser types, and access other vital browser functions.<\/p>\n\n\n\n<p><a href=\"https:\/\/codeflarelimited.com\/blog\/javascript-web-worker-api\/\">JavaScript Web Worker API<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript is known for its versatility in web development, and one of its powerful features is its ability<\/p>\n","protected":false},"author":3,"featured_media":2485,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[99],"class_list":["post-2480","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-software-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Browser Object Model<\/title>\n<meta name=\"description\" content=\"Learn the Browser Object Model (BOM) in JavaScript and learn how to interact with browser features like window management, URL control ...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Browser Object Model\" \/>\n<meta property=\"og:description\" content=\"Learn the Browser Object Model (BOM) in JavaScript and learn how to interact with browser features like window management, URL control ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-10-03T11:29:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-03T15:33:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/10\/IMG-20241003-WA0030.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1120\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kene Samuel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/\"},\"author\":{\"name\":\"Kene Samuel\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\"},\"headline\":\"JavaScript Browser BOM: A Comprehensive Guide\",\"datePublished\":\"2024-10-03T11:29:49+00:00\",\"dateModified\":\"2024-10-03T15:33:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/\"},\"wordCount\":769,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/IMG-20241003-WA0030.jpg\",\"keywords\":[\"software development\"],\"articleSection\":[\"javascript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/\",\"name\":\"Browser Object Model\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/IMG-20241003-WA0030.jpg\",\"datePublished\":\"2024-10-03T11:29:49+00:00\",\"dateModified\":\"2024-10-03T15:33:59+00:00\",\"description\":\"Learn the Browser Object Model (BOM) in JavaScript and learn how to interact with browser features like window management, URL control ...\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/IMG-20241003-WA0030.jpg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/IMG-20241003-WA0030.jpg\",\"width\":1120,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/browser-object-model\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"javascript\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Browser BOM: A Comprehensive Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/c501609bab46c16807eb32106074f206\",\"name\":\"Kene Samuel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g\",\"caption\":\"Kene Samuel\"},\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/kene\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Browser Object Model","description":"Learn the Browser Object Model (BOM) in JavaScript and learn how to interact with browser features like window management, URL control ...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/","og_locale":"en_US","og_type":"article","og_title":"Browser Object Model","og_description":"Learn the Browser Object Model (BOM) in JavaScript and learn how to interact with browser features like window management, URL control ...","og_url":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/","article_published_time":"2024-10-03T11:29:49+00:00","article_modified_time":"2024-10-03T15:33:59+00:00","og_image":[{"width":1120,"height":630,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/10\/IMG-20241003-WA0030.jpg","type":"image\/jpeg"}],"author":"Kene Samuel","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/"},"author":{"name":"Kene Samuel","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206"},"headline":"JavaScript Browser BOM: A Comprehensive Guide","datePublished":"2024-10-03T11:29:49+00:00","dateModified":"2024-10-03T15:33:59+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/"},"wordCount":769,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/10\/IMG-20241003-WA0030.jpg","keywords":["software development"],"articleSection":["javascript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/","url":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/","name":"Browser Object Model","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/10\/IMG-20241003-WA0030.jpg","datePublished":"2024-10-03T11:29:49+00:00","dateModified":"2024-10-03T15:33:59+00:00","description":"Learn the Browser Object Model (BOM) in JavaScript and learn how to interact with browser features like window management, URL control ...","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/browser-object-model\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/10\/IMG-20241003-WA0030.jpg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/10\/IMG-20241003-WA0030.jpg","width":1120,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/browser-object-model\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"javascript","item":"https:\/\/codeflarelimited.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript Browser BOM: A Comprehensive Guide"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/c501609bab46c16807eb32106074f206","name":"Kene Samuel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e1716cd715a5b5491e1f2da373b52f2f73aeb37d268baff34719116e386d848?s=96&d=mm&r=g","caption":"Kene Samuel"},"url":"https:\/\/codeflarelimited.com\/blog\/author\/kene\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2024\/10\/IMG-20241003-WA0030.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=2480"}],"version-history":[{"count":1,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2480\/revisions"}],"predecessor-version":[{"id":2481,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/2480\/revisions\/2481"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/2485"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=2480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=2480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=2480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}