{"id":19440,"date":"2018-10-11T11:30:04","date_gmt":"2018-10-11T11:30:04","guid":{"rendered":"https:\/\/www.heartinternet.uk\/blog\/?p=19440"},"modified":"2018-10-11T11:30:04","modified_gmt":"2018-10-11T11:30:04","slug":"5-more-things-you-didnt-know-a-browser-could-do","status":"publish","type":"post","link":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/","title":{"rendered":"5 more things you didn&#8217;t know a browser could do!"},"content":{"rendered":"<p>The web is an incredible place these days. New browser capabilities, paired with big improvements to the JavaScript language and advancements in development tools and frameworks, are changing the way we think about the web: from a place to read simple documents to a vast repository of great apps that rivals native platforms.\n<\/p>\n<p>\nIn fact, a lot of these new browser capabilities have to do with closing the gap between web and native apps, by providing new APIs that allow websites to do things like requesting geolocation information or sending push notifications, just like native apps do. <a href=\"https:\/\/sambego.be\/\">Sam Bellen<\/a> already covered these examples and some more <a href=\"https:\/\/www.heartinternet.uk\/blog\/5-things-you-didnt-know-a-browser-could-do\/\">in a previous article<\/a>. In this one, we&#8217;re going to take a look at five more amazing things modern browsers can do.<\/p>\n<h2>Payment Request<\/h2>\n<p>Unless you&#8217;re building wildly creative websites, online multimedia experiences or web-based games, some new browser APIs can feel like they&#8217;re super fun but not so much useful for your daily work. Sure, it&#8217;s pretty cool that you can connect a gamepad to your browser, as we&#8217;ll see later, but you might also think that&#8217;s not going to help driving up conversion rates for your clients&#8217; ecommerce sites (unless, you know, you&#8217;re building wildly creative ecommerce sites!). However the new Payment Request API proves that&#8217;s not always the case, and it can in fact help with those conversion rates. Let&#8217;s see how.\n<\/p>\n<p>\nFirst-time users of ecommerce sites often face long and cumbersome checkout processes. These can be particularly painful in mobile devices, where typing is less comfortable and users&#8217; attention is generally more divided. The Payment Request API allows developers to take advantage of a native user interface to ask for payment details, built into the browser itself. This not only provides a consistent experience to users, but can also make the process much easier and faster: users only need to enter their details once, and the browser will remember them for future payments, even for other sites. Moreover, it&#8217;s not unusual to find that a lot of the required information is already filled in in the first place, because browsers can extract it from previous form auto completion data.\n<\/p>\n<p>\nYou can see how this all looks in Chrome for desktop and Android in the screenshots below. If your browser supports this API (more about that later), <a href=\"https:\/\/soyguijarro.github.io\/magic-web\/payment\">you can check out the demo in my Magic Web web app<\/a>.\n<\/p>\n<p align=\"center\">\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/magicweb-desktop.jpg\" alt=\"The Magic Web example of the payment request feature in a desktop browser\" width=\"416\" height=\"324\" class=\"aligncenter size-full wp-image-19540\" \/><br \/><small>Payment Request API example in Chrome for desktop<\/small><\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/magicweb-mobile.jpg\" alt=\"A Magic Web example of the Payment Request feature in a mobile browser\" width=\"475\" height=\"650\" class=\"aligncenter size-full wp-image-19539\" \/><br \/><small>Payment Request API example in Chrome for Android<\/small><\/p>\n<p>The basic usage of the API is very straightforward. First, we need a <code>PaymentRequest<\/code> instance:<\/p>\n<p><code>const paymentRequest = new PaymentRequest(methods, details, options);<\/code><\/p>\n<p>As you can see, the constructor accepts three parameters (named as <code>methods<\/code>, <code>details<\/code> and <code>options<\/code> variables in the example above). They hold all the information about the purchase, like a list of the things the user is going to pay for, total price and accepted payment methods:<\/p>\n<pre><code>const methods = [{\n  supportedMethods: ['basic-card'],\n  data: {\n    supportedNetworks: ['visa', 'mastercard'],\n  },\n}];\nconst details = {\n  displayItems: [\n    {\n      label: 'Nice t-shirt',\n      amount: { currency: 'EUR', value: '35.00' },\n    },\n  ],\n  total: {\n    label: 'Total',\n    amount: { currency: 'EUR', value: '35.00' },\n  }\n};\nconst options = {\n  requestPayerName: true,\n  requestPayerEmail: true\n};<\/code><\/pre>\n<p>The API is very complete and there are a lot of optional keys in these objects, in order to ask for things like address or shipping options (and update prices accordingly on the fly). Please refer to <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/PaymentRequest\/PaymentRequest\">the PaymentRequest documentation on MDN<\/a> for more information.<\/p>\n<p>Once our <code>PaymentRequest<\/code> instance is created, all we need to do is call its <code>show<\/code> method to let the browser know that it needs to display the payment UI. This returns a <code>Promise<\/code> that resolves to an object with the payment information, plus a <code>complete<\/code> method to tell the browser whether the payment was processed successfully, so that the UI can be updated:<\/p>\n<pre><code>paymentRequest.show()\n  .then((result) => {\n    \/\/ User confirmed info in payment UI\n    callPaymentProvider(result).then(() => {\n      \/\/ Payment successful\n      result.complete('success');\n    }).catch(error => {\n      \/\/ Error processing payment\n      result.complete('fail');\n    });\n  }).catch(() => {\n    \/\/ User left payment UI\n    result.complete('fail');\n  });<\/code><\/pre>\n<p>Notice that the browser only takes care of collecting the payment information; the payment processing itself is up to you. In other words, you need to take that information and send it to your server or third party payment provider (think <a href=\"https:\/\/stripe.com\/\">Stripe<\/a>, for example). This is represented in the code above as a <code>callPaymentProvider<\/code> function.<\/p>\n<p>The future of the Payment Request API looks very bright at the time of writing: latest versions of Chrome, Edge and Safari already support it, and it&#8217;s currently <a href=\"https:\/\/platform-status.mozilla.org\/#payment-request\">in development for Firefox.<\/a><\/p>\n<h2>Device Orientation<\/h2>\n<p>Wouldn&#8217;t it be cool if your page could react to a user shaking their device or rotating it? This is not only possible but actually quite easy to do thanks to <code>DeviceMotion<\/code> and <code>DeviceOrientation<\/code> events. Let&#8217;s see how they work.\n<\/p>\n<p>\nThese are events just like <code>click<\/code> or <code>load<\/code>, so we only need to add an event listener for them and handle the events whatever way we want. For example, to detect that the device is being shaken:\n<\/p>\n<pre><code>const SHAKING_ACCEL = 30;\n\nwindow.addEventListener('devicemotion', event => {\n  const {acceleration} = event;\n  \n  if (acceleration.x > SHAKING_ACCEL && acceleration.y > SHAKING_ACCEL) {\n    console.log('Device being shaken');\n  }\n});<\/code><\/pre>\n<p>\nOr if we wanted to listen to the rotation of the device:\n<\/p>\n<pre><code>window.addEventListener('deviceorientation', event => {\n  console.log(`Device rotated ${event.alpha} degrees`);\n});<\/code><\/pre>\n<p>\nTake a look at the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Apps\/Fundamentals\/gather_and_modify_data\/responding_to_device_orientation_changes\"><code>deviceorientation<\/code> and <code>devicemotion<\/code> events documentation on MDN<\/a> for additional details. Support for these events is very good, and they can be used confidently in all major mobile browsers.<\/p>\n<h2>Gamepad<\/h2>\n<p>\nWe promised we&#8217;d see how to control the browser with a gamepad, and the time has come. The appropriately named Gamepad API allows us to do just that. The introduction of this browser capability opened the door for proper web-based games and other interactive experiences. Although it might be a little bit trickier to use than others, it&#8217;s still a nice API and you can get up and running with it in no time.\n<\/p>\n<p>\nFirst, we get all the gamepads connected to the device. Let&#8217;s say we want to use the first one for this example.\n<\/p>\n<pre><code>const gamepads = navigator.getGamepads();\nconst gamepad = gamepads[0];<\/code><\/pre>\n<p>\nThe <code>gamepad<\/code> variable is an object, the properties of which we can access to check what buttons are being pressed:\n<\/p>\n<pre><code>const {buttons, axes} = gamepad;\n\nconst indexOfButtonPressed = buttons.findIndex(button => button.pressed);\n\nconst isUpPressed = axes.y === -1;\nconst isDownPressed = axes.y === 1;\nconst isLeftPressed = axes.x === -1;\nconst isRightPressed = axes.x === 1;<\/code><\/pre>\n<p>\nBut here&#8217;s the catch: if we want our page to react to button presses, we need to be constantly checking these properties, because there are no events for them. So how do we do that? The recommended and most performant way is to make use of <code>requestAnimationFrame<\/code>:\n<\/p>\n<pre><code>const logIfUpPressed = () => {\n  if (buttons.axes.y === -1) {\n    console.log('Up pressed');\n  }\n  \n  requestAnimationFrame(logIfUpPressed);\n};\n\nlogIfUpPressed();<\/code><\/pre>\n<p>\nThe code above will call the <code>logIfUpPressed<\/code> function first, which will check whether the gamepad&#8217;s axis is pressed in the up direction. Then <code>requestAnimationFrame<\/code> will be called with the same function, which will schedule the function to be run in the next frame. The process will be repeated indefinitely, effectively checking the state of the gamepad every frame.\n<\/p>\n<p>\nThere are also events that we can listen to in order to trigger an action when a gamepad is connected or disconnected:\n<\/p>\n<pre><code>window.addEventListener('gamepadconnected', () => {\n  console.log('Gamepad connected');\n});\n\nwindow.addEventListener('gamepaddisconnected', () => {\n  console.log('Gamepad disconnected');\n});<\/code><\/pre>\n<p>\nAlthough it&#8217;s not so well-known, this API has been around for quite some time, so <a href=\"https:\/\/platform-status.mozilla.org\/#gamepad\">all major modern browsers support it<\/a>. There&#8217;s a b<a href=\"https:\/\/soyguijarro.github.io\/magic-web\/gamepad\">asic demo in my Magic Web web app<\/a> if you want to try it for yourself.\n<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/magicweb-gamepad.jpg\" alt=\"The Magic Web example of gamepad control in a browser\" width=\"650\" height=\"380\" class=\"aligncenter size-full wp-image-19542\" \/><br \/><small>Connecting a gamepad in the Magic Web example<\/small><\/p>\n<h2>Shape Detection<\/h2>\n<p>\nOne API that seems to have more creative uses at first sight is the Shape Detection API. It greatly simplifies the detection of faces in images in the browser, but it can also detect barcodes, so it really has some practical applications, too. This is something that can already be achieved with JavaScript (there are in fact some libraries that do it out there), but having an API for it means better performance and shipping less code to our users.\n<\/p>\n<p>\nThe Shape Detection API is extremely simple to use. First, we need an image:<\/p>\n<p>\n<code>const image = document.querySelector('img');<\/code>\n<\/p>\n<p>\nThen, we just instantiate a detector and call its <code>detect<\/code> method with the image:\n<\/p>\n<pre><code>const faceDetector = new FaceDetector();\n\nfaceDetector.detect(image).then(faces => {\n  console.log(`There are ${faces.length} faces`);\n});<\/code><\/pre>\n<p>As you can see, the <code>detect<\/code> method returns a <code>Promise<\/code> that resolves to an array of detected elements. Each of them is an object with information about the element detected, such as its boundaries, the eyes and the mouth position in the case of faces, or the code value for barcodes. Check the <a href=\"https:\/\/wicg.github.io\/shape-detection-api\/#examples\">examples section in the Shape Detection API spec<\/a> for more information.\n<\/p>\n<p>\nThe bad news about the Shape Detection API is that <a href=\"https:\/\/www.chromestatus.com\/features\/4757990523535360\">only Chrome supports it<\/a> at the moment, and a feature flag needs to be activated for it. However, the API has been well received among developers, so there&#8217;s hope that it&#8217;ll be adopted by other browsers. If you want to try a simple demo, open Chrome and enable the feature flag by navigating to <code>chrome:\/\/flags\/#enable-experimental-web-platform-features<\/code>, and then <a href=\"https:\/\/soyguijarro.github.io\/magic-web\/shape-detection\">go to this demo in my Magic Web web app<\/a>.<\/p>\n<p align=\"center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/magicweb-facedetection.jpg\" alt=\"The Magic Web example of Face Detection in a browser\" width=\"650\" height=\"360\" class=\"aligncenter size-full wp-image-19544\" \/><br \/><small>Testing the Shape Detection API in Magic Web<\/small><\/p>\n<h2>Web Bluetooth<\/h2>\n<p>We&#8217;re finishing this article with a pretty surprising API. The Web Bluetooth API allows websites to communicate with Bluetooth devices. That&#8217;s right, browsers can now directly connect to wireless devices, no extra software needed. And once again, it&#8217;s easier to do than you might think.\n<\/p>\n<p>\nThis is how to connect to a Bluetooth device and read its battery level:<\/p>\n<pre><code>navigator.bluetooth.requestDevice()\n  .then(device => {\n    console.log(`Selected device: ${device.name}`);\n    return device.gatt.connect();\n  })\n  .then(server => server.getPrimaryService('battery_service'))\n  .then(server => server.getCharacteristic('battery_level'))\n  .then(characteristic => characteristic.readValue())\n  .then(batteryLevel => {\n    console.log(`Battery level is ${batteryLevel}`);\n  });<\/code><\/pre>\n<p>When the <code>requestDevice<\/code> method is called, the user is presented with a list of nearby Bluetooth devices, so that one can be selected. That&#8217;s why the method returns a <code>Promise<\/code>, which resolves to the selected device. Then all that&#8217;s left to do is to connect to the device and get or set whatever values we want. There&#8217;s some jargon in the API coming from the Bluetooth specification, but you get the idea: the device values we want to read or write are called <em>characteristics<\/em>, which are grouped by <em>services<\/em>.\n<\/p>\n<p>\nThese are the basics of the API but there&#8217;s more to it; check out this <a href=\"https:\/\/developers.google.com\/web\/updates\/2015\/07\/interact-with-ble-devices-on-the-web\">article from Google&#8217;s Web Updates blog<\/a> for a more in-depth introduction.\n<\/p>\n<p>\nJust like the Shape Detection API, currently <a href=\"https:\/\/platform-status.mozilla.org\/#web-bluetooth\">only Chrome supports the Web Bluetooth API<\/a> and the same feature flag needs to be activated, unless you&#8217;re on Android or a Mac. <a href=\"https:\/\/developer.microsoft.com\/en-us\/microsoft-edge\/platform\/status\/webbluetooth\/\">Edge is considering implementing it<\/a>, so better browser support might come in the future for this API.\n<\/p>\n<p>\nIf you happen to own a compatible Bluetooth light bulb, you can <a href=\"https:\/\/soyguijarro.github.io\/magic-web\/bluetooth\">try a cool demo in my Magic Web web app<\/a> that combines the Web Bluetooth API with DeviceMotion events to let you turn on and off a light bulb by shaking the device. There&#8217;s also a <a href=\"https:\/\/youtu.be\/yW5T3CrgZDU?t=36m12s\">recording of me performing this demo live<\/a> at a conference (in Spanish, but you can see the demo anyway).\n<\/p>\n<p><iframe loading=\"lazy\" width=\"650\" height=\"365\" align=\"center\" src=\"https:\/\/www.youtube.com\/embed\/yW5T3CrgZDU?start=2172\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen><\/iframe><\/p>\n<h2>Conclusion<\/h2>\n<p>\nI hope this article has showed you how incredibly powerful the web platform is today. Browsers can now do things we didn&#8217;t even dream of just a few years ago, and support for some of them starts to look surprisingly good. We can offer better and more innovative web experiences than ever to our users, experiences that feel closer to native apps while still benefiting from the ubiquity of the web. So please, go open your favourite editor and build something amazing!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Browsers can do more than you think. We explore five browser functions that can let you introduce new features for website visitors, from a payment request API to a gamepad.<\/p>\n","protected":false},"author":2,"featured_media":19458,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,24],"tags":[],"class_list":{"0":"post-19440","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-guest-posts","8":"category-web-design"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>5 more things you didn&#039;t know a browser could do! - Heart Internet<\/title>\n<meta name=\"description\" content=\"Discover five clever browser features you can use to increase the functionality of the websites you design.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5 more things you didn&#039;t know a browser could do! - Heart Internet\" \/>\n<meta property=\"og:description\" content=\"Discover five clever browser features you can use to increase the functionality of the websites you design.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/\" \/>\n<meta property=\"og:site_name\" content=\"Heart Internet\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/heartinternet\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-11T11:30:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1500\" \/>\n\t<meta property=\"og:image:height\" content=\"1059\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eliot Chambers-Ostler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:site\" content=\"@heartinternet\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eliot Chambers-Ostler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/\"},\"author\":{\"name\":\"Eliot Chambers-Ostler\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\"},\"headline\":\"5 more things you didn&#8217;t know a browser could do!\",\"datePublished\":\"2018-10-11T11:30:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/\"},\"wordCount\":1702,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg\",\"articleSection\":[\"Guest Posts\",\"Web Design\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/\",\"name\":\"5 more things you didn't know a browser could do! - Heart Internet\",\"isPartOf\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg\",\"datePublished\":\"2018-10-11T11:30:04+00:00\",\"description\":\"Discover five clever browser features you can use to increase the functionality of the websites you design.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg\",\"width\":1500,\"height\":1059,\"caption\":\"A woman using a laptop on a sofa\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.heartinternet.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5 more things you didn&#8217;t know a browser could do!\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/heartblog.victory.digital\/#website\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"name\":\"Heart Internet\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/heartblog.victory.digital\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/heartblog.victory.digital\/#organization\",\"name\":\"Heart Internet\",\"url\":\"https:\/\/heartblog.victory.digital\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp\",\"width\":992,\"height\":252,\"caption\":\"Heart Internet\"},\"image\":{\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/heartinternet\/\",\"https:\/\/x.com\/heartinternet\",\"https:\/\/www.linkedin.com\/company\/heart-internet-ltd\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28\",\"name\":\"Eliot Chambers-Ostler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"contentUrl\":\"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg\",\"caption\":\"Eliot Chambers-Ostler\"},\"url\":\"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"5 more things you didn't know a browser could do! - Heart Internet","description":"Discover five clever browser features you can use to increase the functionality of the websites you design.","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:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/","og_locale":"en_GB","og_type":"article","og_title":"5 more things you didn't know a browser could do! - Heart Internet","og_description":"Discover five clever browser features you can use to increase the functionality of the websites you design.","og_url":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/","og_site_name":"Heart Internet","article_publisher":"https:\/\/www.facebook.com\/heartinternet\/","article_published_time":"2018-10-11T11:30:04+00:00","og_image":[{"width":1500,"height":1059,"url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg","type":"image\/jpeg"}],"author":"Eliot Chambers-Ostler","twitter_card":"summary_large_image","twitter_creator":"@heartinternet","twitter_site":"@heartinternet","twitter_misc":{"Written by":"Eliot Chambers-Ostler","Estimated reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#article","isPartOf":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/"},"author":{"name":"Eliot Chambers-Ostler","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28"},"headline":"5 more things you didn&#8217;t know a browser could do!","datePublished":"2018-10-11T11:30:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/"},"wordCount":1702,"commentCount":0,"publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg","articleSection":["Guest Posts","Web Design"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/","url":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/","name":"5 more things you didn't know a browser could do! - Heart Internet","isPartOf":{"@id":"https:\/\/heartblog.victory.digital\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage"},"image":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage"},"thumbnailUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg","datePublished":"2018-10-11T11:30:04+00:00","description":"Discover five clever browser features you can use to increase the functionality of the websites you design.","breadcrumb":{"@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#primaryimage","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2018\/09\/woman-using-a-laptop.jpg","width":1500,"height":1059,"caption":"A woman using a laptop on a sofa"},{"@type":"BreadcrumbList","@id":"https:\/\/www.heartinternet.uk\/blog\/5-more-things-you-didnt-know-a-browser-could-do\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.heartinternet.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"5 more things you didn&#8217;t know a browser could do!"}]},{"@type":"WebSite","@id":"https:\/\/heartblog.victory.digital\/#website","url":"https:\/\/heartblog.victory.digital\/","name":"Heart Internet","description":"","publisher":{"@id":"https:\/\/heartblog.victory.digital\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/heartblog.victory.digital\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/heartblog.victory.digital\/#organization","name":"Heart Internet","url":"https:\/\/heartblog.victory.digital\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/02\/HeartInternet_Logo_Colour.webp","width":992,"height":252,"caption":"Heart Internet"},"image":{"@id":"https:\/\/heartblog.victory.digital\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/heartinternet\/","https:\/\/x.com\/heartinternet","https:\/\/www.linkedin.com\/company\/heart-internet-ltd"]},{"@type":"Person","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/58ed7f27cc0f3ab6e69135742a5eee28","name":"Eliot Chambers-Ostler","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/heartblog.victory.digital\/#\/schema\/person\/image\/","url":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","contentUrl":"https:\/\/www.heartinternet.uk\/blog\/wp-content\/uploads\/2025\/08\/cropped-Eliot-96x96.jpg","caption":"Eliot Chambers-Ostler"},"url":"https:\/\/www.heartinternet.uk\/blog\/author\/eliot-chambers-ostler\/"}]}},"_links":{"self":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/19440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/comments?post=19440"}],"version-history":[{"count":0,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/posts\/19440\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media\/19458"}],"wp:attachment":[{"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/media?parent=19440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/categories?post=19440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.heartinternet.uk\/blog\/wp-json\/wp\/v2\/tags?post=19440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}