{"id":17592,"date":"2019-07-24T18:19:25","date_gmt":"2019-07-24T10:19:25","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=17592"},"modified":"2025-04-24T17:19:18","modified_gmt":"2025-04-24T09:19:18","slug":"osx-notification-center-for-website","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/","title":{"rendered":"How to Add Notification for Your Website (Updated)"},"content":{"rendered":"<p>The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the web, this capability is enabled by the Notification API available in browsers.<\/p>\n<p>The Notification API was first introduced in OS X <a href=\"https:\/\/www.hongkiat.com\/blog\/mountain-lion-features\/\" rel=\"noopener\" target=\"_blank\">Mountain Lion<\/a> and is now available in all modern browsers, including Edge and Opera. This enables regular websites and web applications such as <a href=\"https:\/\/slack.com\" rel=\"noopener\" target=\"_blank\">Slack<\/a> and <a href=\"https:\/\/intercom.com\/\" rel=\"noopener\" target=\"_blank\">Intercom<\/a> to send out notifications when there\u2019s an incoming message or a <em>mention<\/em> in your account. In macOS, this notification appears at the top right of the screen, as shown below. It disappears after a certain amount of time and is then stored in the <strong>Notification Center<\/strong>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" alt=\"macOS Slack notification example\" height=\"480\" src=\"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/macos-notification-example-slack.jpg\" width=\"750\"><\/figure>\n<p>Let\u2019s see how we can utilize this API on our website.<\/p>\n<p class=\"note\"><strong>Recommended Reading:<\/strong> <a href=\"https:\/\/www.hongkiat.com\/blog\/show-n-hide-notification-bar\/\" rel=\"noopener\" target=\"_blank\">How to Create Hide \/ Show Notification Bar With CSS3<\/a><\/p>\n<h2>The Notification Permission<\/h2>\n<p>First, let\u2019s walk through the permissions. Before a website can show notifications, users must explicitly grant permission. There are three permission levels for notifications: <code>default<\/code>, <code>granted<\/code>, and <code>denied<\/code>. To check the current permission level, you can run the following code in the browser console:<\/p>\n<pre>\nwindow.Notification.permission<\/pre>\n<p>This code logs the current permission level to the console. In my case, it returns <code>'granted'<\/code>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" alt=\"Browser console showing permission granted\" height=\"202\" src=\"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/notification-permission.jpg\" width=\"750\"><\/figure>\n<p>Users can deny notifications at any time through the browser\u2019s preferences or site settings.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" alt=\"Browser site settings notification permission\" height=\"433\" src=\"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/notification-tab-setting.jpg\" width=\"750\"><\/figure>\n<h2>Running the Notification<\/h2>\n<p>Notifications are created using the <code>window.Notification<\/code> object. The following code, slightly modified for demonstration purposes, is borrowed from a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/notification\" rel=\"noopener\" target=\"_blank\">Mozilla Developer Network example<\/a>:<\/p>\n<pre>\nfunction notifyMe(title, options) {\n  \/\/ Check if the browser supports notifications\n  if (!('Notification' in window)) {\n    $('.support, .no-permission, .notify-click').hide();\n    return;\n  }\n\n  $('.no-support').hide();\n\n  \/\/ Check whether notification permissions have already been granted.\n  if (Notification.permission === \"granted\") {\n    $('.no-permission').hide();\n    var notification = new Notification(title, options);\n  }\n  \/\/ Otherwise, we need to ask the user for permission.\n  else if (Notification.permission !== \"denied\") {\n    Notification.requestPermission().then(function (permission) {\n      if (permission === \"granted\") {\n        $('.no-permission').hide();\n        var notification = new Notification(title, options);\n      }\n    });\n  }\n}<\/pre>\n<p>In the preceding code, we created a function named <code>notifyMe<\/code> that wraps the <code>Notification<\/code> constructor, allowing us to pass two arguments: <code>title<\/code> and <code>options<\/code>.<\/p>\n<p>Then, simply call this function with the desired arguments. In this example, we set the <code>title<\/code> to <strong>\u201cHi, there! \ud83d\udc4b\u201d<\/strong> and the notification body to <strong>\u201cWelcome to our website\u201d<\/strong> within the <code>options<\/code> object, like so.<\/p>\n<pre>\nnotifyMe('Hi, there! \ud83d\udc4b', { body: 'Welcome to our website' });<\/pre>\n<p>If the user hasn\u2019t yet set the permission, the browser (like Safari shown here) will first prompt them to <strong>Allow<\/strong> or <strong>Don\u2019t Allow<\/strong> notifications from this site.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" alt=\"Safari notification permission prompt\" height=\"433\" src=\"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/notification-permission-prompt.jpg\" width=\"750\"><\/figure>\n<p>Once granted, the notification will appear, as shown in the following screenshot.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" alt=\"Website notification preview macOS\" height=\"433\" src=\"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/notification-preview.jpg\" width=\"750\"><\/figure>\n<h2>Event<\/h2>\n<p>Furthermore, notifications can be triggered by events. For example, using the jQuery <code>.on<\/code> method, we can trigger a notification when a user clicks a button:<\/p>\n<pre>\n$('.button').on('click', function() {\n  notifyMe('Hi, there \ud83d\udc4b', { body: 'You've just clicked the button.' });\n});<\/pre>\n<h2>Further Reference<\/h2>\n<p>As you can see, using the Notification API is quite straightforward. Although the code shown here covers the basics, you\u2019ll likely need to adapt it to suit your specific needs. Browser support is quite good; it works in all major desktop browsers and many mobile browsers. You can see it in action and download the source code from the links below:<\/p>\n<div class=\"button\">\n    <a href=\"https:\/\/hongkiat.github.io\/osx-notification-center\/\" rel=\"nofollow noopener\" target=\"_blank\">View Demo<\/a>\n    <a href=\"https:\/\/codeload.github.com\/hongkiat\/osx-notification-center\/zip\/refs\/heads\/master\" rel=\"nofollow noopener\" target=\"_blank\">Download Source<\/a>\n<\/div>\n<p>Follow these references to explore the API further.<\/p>\n<ul>\n<li><a href=\"https:\/\/dvcs.w3.org\/hg\/notifications\/raw-file\/tip\/Overview.html\" rel=\"noopener nofollow\" target=\"_blank\">Web Notifications<\/a> \u2013 W3C.org<\/li>\n<li><a href=\"https:\/\/www.chromium.org\/developers\/design-documents\/desktop-notifications\/api-specification\/\" rel=\"noopener\" target=\"_blank\">Chromium Desktop Notification<\/a> \u2013 Chromium<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/notification\">Notification Web API<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the web, this capability is enabled by the Notification API available in browsers. The Notification API was first introduced in OS X Mountain Lion and is now available in all modern&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3395],"tags":[3933,2556],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Add Notification for Your Website (Updated) - Hongkiat<\/title>\n<meta name=\"description\" content=\"The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the\" \/>\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.hongkiat.com\/blog\/osx-notification-center-for-website\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Notification for Your Website (Updated)\" \/>\n<meta property=\"og:description\" content=\"The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-24T10:19:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-24T09:19:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/macos-notification-example-slack.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"How to Add Notification for Your Website (Updated)\",\"datePublished\":\"2019-07-24T10:19:25+00:00\",\"dateModified\":\"2025-04-24T09:19:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/\"},\"wordCount\":452,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/osx-notification-center-for-website\\\/macos-notification-example-slack.jpg\",\"keywords\":[\"macOS\",\"notification\"],\"articleSection\":[\"UI\\\/UX\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/\",\"name\":\"How to Add Notification for Your Website (Updated) - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/osx-notification-center-for-website\\\/macos-notification-example-slack.jpg\",\"datePublished\":\"2019-07-24T10:19:25+00:00\",\"dateModified\":\"2025-04-24T09:19:18+00:00\",\"description\":\"The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/osx-notification-center-for-website\\\/macos-notification-example-slack.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/osx-notification-center-for-website\\\/macos-notification-example-slack.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/osx-notification-center-for-website\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Notification for Your Website (Updated)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Add Notification for Your Website (Updated) - Hongkiat","description":"The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the","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.hongkiat.com\/blog\/osx-notification-center-for-website\/","og_locale":"en_US","og_type":"article","og_title":"How to Add Notification for Your Website (Updated)","og_description":"The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the","og_url":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2019-07-24T10:19:25+00:00","article_modified_time":"2025-04-24T09:19:18+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/macos-notification-example-slack.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"How to Add Notification for Your Website (Updated)","datePublished":"2019-07-24T10:19:25+00:00","dateModified":"2025-04-24T09:19:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/"},"wordCount":452,"commentCount":5,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/macos-notification-example-slack.jpg","keywords":["macOS","notification"],"articleSection":["UI\/UX"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/","url":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/","name":"How to Add Notification for Your Website (Updated) - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/macos-notification-example-slack.jpg","datePublished":"2019-07-24T10:19:25+00:00","dateModified":"2025-04-24T09:19:18+00:00","description":"The notification interface has become a common part of our digital interaction, both on the desktop, mobile devices, and on the Web. Specifically on the","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/macos-notification-example-slack.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/osx-notification-center-for-website\/macos-notification-example-slack.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/osx-notification-center-for-website\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Notification for Your Website (Updated)"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-4zK","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/17592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=17592"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/17592\/revisions"}],"predecessor-version":[{"id":74124,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/17592\/revisions\/74124"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=17592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=17592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=17592"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=17592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}