{"id":18708,"date":"2020-06-30T13:11:48","date_gmt":"2020-06-30T20:11:48","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=18708"},"modified":"2023-12-01T03:37:11","modified_gmt":"2023-12-01T11:37:11","slug":"javascript-cookies","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/","title":{"rendered":"JavaScript Cookies: A Guide"},"content":{"rendered":"\n<p>Cookies are both a delicious snack and a crucial part of modern websites.&nbsp;<br><\/p>\n\n\n\n<p>Cookies allow you to store data about a user in the web browser. Cookies often store information like authentication sessions so the browser remembers you have logged in to a web page.<br><\/p>\n\n\n\n<p>In this guide, we\u2019re going to talk about why cookies exist, what types of cookies there are and how to use cookies in JavaScript. Let\u2019s begin!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are Browser Cookies?<\/h2>\n\n\n\n<p>Cookies are strings of text which store information about a user in their browser. The idea was pioneered by Netscape, which developed one of the most popular browsers in the world in the 1990s. Netscape developed cookies to track whether a user had already visited their site. If they had, it meant the user probably knew something about Netscape.<br><\/p>\n\n\n\n<p>Cookies must contain at least a name and a value field. The name field is used to identify the contents of the value field. A cookie can store additional attributes such as a file path and when it expires, depending on how you are using cookies in your applications.<br><\/p>\n\n\n\n<p>Here\u2019s an example of a cookie:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Name: Authentication\nValue: AUTHENTICATION_KEY\nDomain: careerkarma.com<\/pre><\/div>\n\n\n\n<p>Cookies are stored in key:value pairs. When you view this cookie, you\u2019d see the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Authentication=AUTHENTICATION_KEY<\/pre><\/div>\n\n\n\n<p>This cookie would store the value AUTHENTICATION_KEY in your browser. Every time you access the domain careerkarma.com, that cookie would be made available to the site.&nbsp;<br><\/p>\n\n\n\n<p>There\u2019s no limit to how many cookies you can set for a site, but what you\u2019ll find is that most applications only need to set a few, if any. Often, cookies are used to keep track of a user\u2019s session.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Retrieve Browser Cookies<\/h2>\n\n\n\n<p>JavaScript has an object called document.cookie which stores information about all the cookies available to a site. To set, update and delete cookies, we need to manipulate this object. To retrieve cookies, we can just call this object:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>console.log(document.cookie);<\/pre><\/div>\n\n\n\n<p>This code will return a list of all the cookies set in the browser. There\u2019s no way to retrieve an individual cookie from this list without writing a custom function to do so.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Set a Browser Cookie<\/h2>\n\n\n\n<p>How do I set a browser cookie? Well, there\u2019s one thing you should know upfront: it\u2019s arguably easier than baking your own cookies.<br><\/p>\n\n\n\n<p>Let\u2019s say we want to store a user\u2019s email in a cookie. We could do so using this JavaScript code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>document.cookie = \"email=user@email.com\";\nconsole.log(document.cookie);<\/pre><\/div>\n\n\n\n<p>This code creates a cookie with the name \u201cemail\u201d and the value \u201c<a href=\"mailto:user@email.com\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">user@email.com<\/a>.\u201d Our <code>console.log()<\/code> statement returns the following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>email=user@email.com;<\/pre><\/div>\n\n\n\n<p>You can also specify a path on which a cookie is available:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>document.cookie = \"email=user@email.com; path=\/dashboard\";<\/pre><\/div>\n\n\n\n<p>This code would make the \u201cemail\u201d cookie available on all paths that begin with \u201c\/dashboard\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cookie Expiry Dates<\/h2>\n\n\n\n<p>By default, cookies are deleted when the browser is closed. When you\u2019re setting a cookie, you can optionally add an expiry date which will override this setting:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>document.cookie = \"email=user@email.com; expires=Wed, 24 Jun 2019 12:00:00 UTC\";<\/pre><\/div>\n\n\n\n<p>This will create a cookie that expires on June 24, 2020 at the start of the day. Your expiry date should be specified in UTC time.<br><\/p>\n\n\n\n<p>One common approach to setting an expiration date is to use the JavaScript Date object, which returns a UTC timestamp. A cookie set to expire on June 30, 2020 would use this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>const expiryDate = new Date(2020, 6, 30);\ndocument.cookie = \"email=user@email.com; expires=\" + expiryDate + \";\";<\/pre><\/div>\n\n\n\n<p>The document.cookie object supports setting a maximum age of a cookie, or Max-Age, which states how long a cookie should be available before expiring. While it is not supported by every browser, it makes it easy for you to create cookies that expire depending on when the user initiated the creation of the cookie:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>const expiryDate= 24 * 60 * 60 * 2;\ndocument.cookie = \"email=user@email.com; max-age=\" + expiryDate + \";\";<\/pre><\/div>\n\n\n\n<p>This will create a cookie that expires after two days.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Updating and Deleting Cookies<\/h2>\n\n\n\n<p>There are no functions used to update or delete cookies. Instead, you make a change to the \u201cdocument.cookie\u201d object.<br><\/p>\n\n\n\n<p>You can update a cookie in the same way as you created it:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>document.cookie = \"email=user@email.app;\"<\/pre><\/div>\n\n\n\n<p>This changes the value of \u201cemail\u201d from \u201c<a href=\"mailto:user@email.com\" target=\"_blank\" rel=\"noopener\" rel=\"nofollow\">user@email.com<\/a>\u201d to \u201cuser@email.app\u201d.<br><\/p>\n\n\n\n<p>Deleting a cookie uses a similar approach. All you have to do is use the same syntax as used to create or update a cookie, but remove the value assigned to the cookie:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>document.cookie = \"email=; expires=Wed, 24 Jun 2019 12:00:00 UTC; path\/;\"<\/pre><\/div>\n\n\n\n<p>You should specify a path to make sure that you delete the right cookie.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Types of Cookies<\/h2>\n\n\n\n<p>Raspberry. Chocolate Chip. Fudge. No, not those types of cookies! In the browser, there are three main types of cookies: session, third-party and persistent.<br><\/p>\n\n\n\n<p>Session cookies are cookies that exist until the browser is closed. These are cookies that are set without an expiry date, like the one in our first example. It\u2019s worth noting that some developers use the term \u201csession cookie\u201d to refer to any cookie that authenticates a user, but session cookies are not the only cookies you can use for authentication.<br><\/p>\n\n\n\n<p>Persistent cookies are cookies that exist even once the browser has closed. These are cookies with a set expiration date.<br><\/p>\n\n\n\n<p>Third-party cookies are cookies that have been created by other websites. An example of this is Google Analytics cookies. If you install Google Analytics on your site, the extension will be able to set cookies to keep track of users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Cookies are a handy way of storing user information in the browser. They are often used to track whether a user has visited a site before and to store authentication cookies.<br><\/p>\n\n\n\n<p>There are three main types of cookies: session, persistent and third-party. For your own applications, you\u2019ll mainly be focused on using session and persistent cookies.<\/p>\n","protected":false},"excerpt":{"rendered":"Cookies are both a delicious snack and a crucial part of modern websites.&nbsp; Cookies allow you to store data about a user in the web browser. Cookies often store information like authentication sessions so the browser remembers you have logged in to a web page. In this guide, we\u2019re going to talk about why cookies&hellip;","protected":false},"author":240,"featured_media":17716,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11933],"tags":[],"class_list":{"0":"post-18708","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-javascript"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"JavaScript","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>JavaScript Cookies: A Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The document.cookie object allows you to store data in a user\u2019s browser using JavaScript. On Career Karma, learn how to work with JavaScript cookies.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/javascript-cookies\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Cookies: A Guide\" \/>\n<meta property=\"og:description\" content=\"The document.cookie object allows you to store data in a user\u2019s browser using JavaScript. On Career Karma, learn how to work with JavaScript cookies.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/javascript-cookies\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-30T20:11:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:37:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-dsOvZnqGawg-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"592\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"JavaScript Cookies: A Guide\",\"datePublished\":\"2020-06-30T20:11:48+00:00\",\"dateModified\":\"2023-12-01T11:37:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/\"},\"wordCount\":919,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/fabian-grohs-dsOvZnqGawg-unsplash.jpg\",\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/\",\"name\":\"JavaScript Cookies: A Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/fabian-grohs-dsOvZnqGawg-unsplash.jpg\",\"datePublished\":\"2020-06-30T20:11:48+00:00\",\"dateModified\":\"2023-12-01T11:37:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The document.cookie object allows you to store data in a user\u2019s browser using JavaScript. On Career Karma, learn how to work with JavaScript cookies.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/fabian-grohs-dsOvZnqGawg-unsplash.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/fabian-grohs-dsOvZnqGawg-unsplash.jpg\",\"width\":900,\"height\":592},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript-cookies\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/javascript\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Cookies: A Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/jamesgallagher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"JavaScript Cookies: A Guide | Career Karma","description":"The document.cookie object allows you to store data in a user\u2019s browser using JavaScript. On Career Karma, learn how to work with JavaScript cookies.","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:\/\/careerkarma.com\/blog\/javascript-cookies\/","og_locale":"en_US","og_type":"article","og_title":"JavaScript Cookies: A Guide","og_description":"The document.cookie object allows you to store data in a user\u2019s browser using JavaScript. On Career Karma, learn how to work with JavaScript cookies.","og_url":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-06-30T20:11:48+00:00","article_modified_time":"2023-12-01T11:37:11+00:00","og_image":[{"width":900,"height":592,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-dsOvZnqGawg-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"JavaScript Cookies: A Guide","datePublished":"2020-06-30T20:11:48+00:00","dateModified":"2023-12-01T11:37:11+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/"},"wordCount":919,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-dsOvZnqGawg-unsplash.jpg","articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/javascript-cookies\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/","url":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/","name":"JavaScript Cookies: A Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-dsOvZnqGawg-unsplash.jpg","datePublished":"2020-06-30T20:11:48+00:00","dateModified":"2023-12-01T11:37:11+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The document.cookie object allows you to store data in a user\u2019s browser using JavaScript. On Career Karma, learn how to work with JavaScript cookies.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/javascript-cookies\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-dsOvZnqGawg-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/fabian-grohs-dsOvZnqGawg-unsplash.jpg","width":900,"height":592},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/javascript-cookies\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/careerkarma.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"JavaScript Cookies: A Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=18708"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/18708\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/17716"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=18708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=18708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=18708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}