{"id":2287,"date":"2019-01-14T11:39:59","date_gmt":"2019-01-14T19:39:59","guid":{"rendered":"https:\/\/www.virendrachandak.com\/techtalk\/?p=2287"},"modified":"2019-01-14T11:57:23","modified_gmt":"2019-01-14T19:57:23","slug":"async-vs-defer","status":"publish","type":"post","link":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/","title":{"rendered":"How to remove render blocking JavaScript with defer and async"},"content":{"rendered":"<p>With HTML5 there are 2 new boolean attributes for <code>&lt;script><\/code> tag which indicates to the browser how the script should be evaluated. The 2 attributes are <code>defer<\/code> and <code>async<\/code>. Using these attributes can help improve the page load time by downloading the script in parallel when the page is being parsed and then executing it either immediately or at the end of page parsing.<br \/>\n<!--more--><\/p>\n<p>If the <code>defer<\/code> attribute is present, then the script is fetched in parallel to the parsing of the page but will be evaluated only after the page is parsed. When <code>async<\/code> attribute is present, then the script is fetched in parallel to the parsing of the page and it will be evaluated as soon as the script is available (potentially before the page is parsed completely). If both <code>defer<\/code> and <code>async<\/code> attributes are not present then the script is fetched and evaluated immediately, and hence blocking the parsing of the page while the script is being downloaded and evaluated.<\/p>\n<p>Here is a quick summary of how the script tag works with and without <code>defer<\/code> and <code>async<\/code> attributes<\/p>\n<p><img src='https:\/\/www.virendrachandak.com\/images\/async-defer.svg' \/><\/p>\n<p>The <code>defer<\/code> and <code>async<\/code> attributes can be specified together. When both are present the <code>async<\/code> tag take preference over <code>defer<\/code>. For the older browsers that don&#8217;t support <code>async<\/code>, but support <code>defer<\/code>, it will fallback to <code>defer<\/code> behavior instead of the default blocking behavior.<\/p>\n<p>With <code>defer<\/code> attribute the order of execution of the script remain the same, but with <code>async<\/code> the order of execution of the script is not guaranteed. Hence, using <code>defer<\/code> is best for the cases where a script depends on another. e.g. if you have jQuery and a script that depends on it, then you should use <code>defer<\/code> on those scripts (including jQuery) to make sure that jQuery is loaded before the dependent scripts.<\/p>\n<p>Both the <code>defer<\/code> and <code>async<\/code> parameters should be specified only if using the src tag. If used without the source tag (on inline scripts) they won&#8217;t affect the execution of the scripts.<\/p>\n<div style=\"padding-top:15px;\">\n<strong>Reference Links<\/strong>:<\/p>\n<ul>\n<li><a title=\"script tag - HTML standard\" href=\"https:\/\/html.spec.whatwg.org\/multipage\/scripting.html#attr-script-defer\" rel=\"external nofollow\" target=\"_blank\">script tag &#8211; HTML standard<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>With HTML5 there are 2 new boolean attributes for &lt;script> tag which indicates to the browser how the script should be evaluated. The 2 attributes are defer and async. Using these attributes can help improve the page load time by downloading the script in parallel when the page is being parsed and then executing it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[144,5,138,8],"tags":[155,156,10],"class_list":["post-2287","post","type-post","status-publish","format-standard","hentry","category-javascript","category-optimization-tips","category-seo","category-web-development","tag-async","tag-defer","tag-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to remove render blocking JavaScript with defer and async - Virendra&#039;s TechTalk<\/title>\n<meta name=\"description\" content=\"Eliminating render blocking JavaScript with async and defer attributes to delay execution of scripts which helps improve performance and page load times.\" \/>\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.virendrachandak.com\/techtalk\/async-vs-defer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to remove render blocking JavaScript with defer and async - Virendra&#039;s TechTalk\" \/>\n<meta property=\"og:description\" content=\"Eliminating render blocking JavaScript with async and defer attributes to delay execution of scripts which helps improve performance and page load times.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/\" \/>\n<meta property=\"og:site_name\" content=\"Virendra&#039;s TechTalk\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/virendrachandak\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/virendrachandak\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-14T19:39:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-14T19:57:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.virendrachandak.com\/images\/async-defer.svg\" \/>\n<meta name=\"author\" content=\"Virendra Chandak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@virendrachandak\" \/>\n<meta name=\"twitter:site\" content=\"@virendrachandak\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virendra Chandak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/\"},\"author\":{\"name\":\"Virendra Chandak\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\"},\"headline\":\"How to remove render blocking JavaScript with defer and async\",\"datePublished\":\"2019-01-14T19:39:59+00:00\",\"dateModified\":\"2019-01-14T19:57:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/\"},\"wordCount\":325,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\"},\"image\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.virendrachandak.com\\\/images\\\/async-defer.svg\",\"keywords\":[\"async\",\"defer\",\"JavaScript\"],\"articleSection\":[\"JavaScript\",\"Optimization Tips\",\"SEO\",\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/\",\"url\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/\",\"name\":\"How to remove render blocking JavaScript with defer and async - Virendra&#039;s TechTalk\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.virendrachandak.com\\\/images\\\/async-defer.svg\",\"datePublished\":\"2019-01-14T19:39:59+00:00\",\"dateModified\":\"2019-01-14T19:57:23+00:00\",\"description\":\"Eliminating render blocking JavaScript with async and defer attributes to delay execution of scripts which helps improve performance and page load times.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.virendrachandak.com\\\/images\\\/async-defer.svg\",\"contentUrl\":\"https:\\\/\\\/www.virendrachandak.com\\\/images\\\/async-defer.svg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/async-vs-defer\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"TechTalk\",\"item\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/category\\\/javascript\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to remove render blocking JavaScript with defer and async\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#website\",\"url\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/\",\"name\":\"Virendra's TechTalk\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/63f7ffa1ea125e32af9618d188349e17\",\"name\":\"Virendra Chandak\",\"logo\":{\"@id\":\"https:\\\/\\\/www.virendrachandak.com\\\/techtalk\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.virendrachandak.com\",\"https:\\\/\\\/www.facebook.com\\\/virendrachandak\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/virendrachandak\\\/\",\"https:\\\/\\\/x.com\\\/virendrachandak\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to remove render blocking JavaScript with defer and async - Virendra&#039;s TechTalk","description":"Eliminating render blocking JavaScript with async and defer attributes to delay execution of scripts which helps improve performance and page load times.","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.virendrachandak.com\/techtalk\/async-vs-defer\/","og_locale":"en_US","og_type":"article","og_title":"How to remove render blocking JavaScript with defer and async - Virendra&#039;s TechTalk","og_description":"Eliminating render blocking JavaScript with async and defer attributes to delay execution of scripts which helps improve performance and page load times.","og_url":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/","og_site_name":"Virendra&#039;s TechTalk","article_publisher":"https:\/\/www.facebook.com\/virendrachandak","article_author":"https:\/\/www.facebook.com\/virendrachandak","article_published_time":"2019-01-14T19:39:59+00:00","article_modified_time":"2019-01-14T19:57:23+00:00","og_image":[{"url":"https:\/\/www.virendrachandak.com\/images\/async-defer.svg","type":"","width":"","height":""}],"author":"Virendra Chandak","twitter_card":"summary_large_image","twitter_creator":"@virendrachandak","twitter_site":"@virendrachandak","twitter_misc":{"Written by":"Virendra Chandak","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#article","isPartOf":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/"},"author":{"name":"Virendra Chandak","@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17"},"headline":"How to remove render blocking JavaScript with defer and async","datePublished":"2019-01-14T19:39:59+00:00","dateModified":"2019-01-14T19:57:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/"},"wordCount":325,"commentCount":0,"publisher":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17"},"image":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#primaryimage"},"thumbnailUrl":"https:\/\/www.virendrachandak.com\/images\/async-defer.svg","keywords":["async","defer","JavaScript"],"articleSection":["JavaScript","Optimization Tips","SEO","Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/","url":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/","name":"How to remove render blocking JavaScript with defer and async - Virendra&#039;s TechTalk","isPartOf":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#primaryimage"},"image":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#primaryimage"},"thumbnailUrl":"https:\/\/www.virendrachandak.com\/images\/async-defer.svg","datePublished":"2019-01-14T19:39:59+00:00","dateModified":"2019-01-14T19:57:23+00:00","description":"Eliminating render blocking JavaScript with async and defer attributes to delay execution of scripts which helps improve performance and page load times.","breadcrumb":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#primaryimage","url":"https:\/\/www.virendrachandak.com\/images\/async-defer.svg","contentUrl":"https:\/\/www.virendrachandak.com\/images\/async-defer.svg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.virendrachandak.com\/techtalk\/async-vs-defer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"TechTalk","item":"https:\/\/www.virendrachandak.com\/techtalk\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.virendrachandak.com\/techtalk\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"How to remove render blocking JavaScript with defer and async"}]},{"@type":"WebSite","@id":"https:\/\/www.virendrachandak.com\/techtalk\/#website","url":"https:\/\/www.virendrachandak.com\/techtalk\/","name":"Virendra's TechTalk","description":"","publisher":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.virendrachandak.com\/techtalk\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/63f7ffa1ea125e32af9618d188349e17","name":"Virendra Chandak","logo":{"@id":"https:\/\/www.virendrachandak.com\/techtalk\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.virendrachandak.com","https:\/\/www.facebook.com\/virendrachandak","https:\/\/www.linkedin.com\/in\/virendrachandak\/","https:\/\/x.com\/virendrachandak"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2vTtQ-AT","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":117,"url":"https:\/\/www.virendrachandak.com\/techtalk\/optimizing-websites\/","url_meta":{"origin":2287,"position":0},"title":"Optimizing \/ Speeding up websites","author":"Virendra Chandak","date":"April 14, 2011","format":false,"excerpt":"In this article I will list a few things that can be done to speed up website. I will give just brief description on each topic and give links to find more details on those topics. I have used tools like Google's Page Speed, YSlow, Audits Tab in Chrome\u00a0Developer\u00a0Tools. 1.\u2026","rel":"","context":"In &quot;Optimization Tips&quot;","block_context":{"text":"Optimization Tips","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/optimization-tips\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":157,"url":"https:\/\/www.virendrachandak.com\/techtalk\/cachebuster-code-in-javascript\/","url_meta":{"origin":2287,"position":1},"title":"Cachebuster code in JavaScript","author":"Virendra Chandak","date":"September 25, 2011","format":false,"excerpt":"The JavaScript, CSS and other files used in a website are often cached by the browser. Sometimes we might want the browser to always fetch the file from the server instead of from the cache. To do this we can use a cachebuster code to make the browser think that\u2026","rel":"","context":"In &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2441,"url":"https:\/\/www.virendrachandak.com\/techtalk\/how-to-track-web-vitals-in-google-analytics\/","url_meta":{"origin":2287,"position":2},"title":"Tracking Web Vitals in Google Analytics","author":"Virendra Chandak","date":"June 3, 2020","format":false,"excerpt":"There are a few different ways to track Web Vitals, however the easiest way is using the web-vitals JavaScript library. In this post we will load the web-vitals directly from CDN and use that to track the Core Web Vitals (LCP, FID, CLS) and other Web Vitals (FCP, TTFB) metrics.\u2026","rel":"","context":"In &quot;Optimization Tips&quot;","block_context":{"text":"Optimization Tips","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/optimization-tips\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1023,"url":"https:\/\/www.virendrachandak.com\/techtalk\/protocol-relative-urls\/","url_meta":{"origin":2287,"position":3},"title":"Protocol relative URLs","author":"Virendra Chandak","date":"October 7, 2014","format":false,"excerpt":"Many times we have seen warnings similar to \"This page contains both secure and nonsecure items\" or \"This page has insecure content.\". This happens when we are viewing a HTTPS site and some content on the site is loaded from HTTP. So when we try to view a site say\u2026","rel":"","context":"In &quot;Web Development&quot;","block_context":{"text":"Web Development","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/web-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":694,"url":"https:\/\/www.virendrachandak.com\/techtalk\/php-double-quotes-vs-single-quotes\/","url_meta":{"origin":2287,"position":4},"title":"PHP double quotes vs single quotes","author":"Virendra Chandak","date":"March 18, 2012","format":false,"excerpt":"Strings in PHP can be specified in four different ways: single quoted, double quoted, heredoc syntax and (since PHP 5.3.0) nowdoc syntax, the first two of them being by far the most frequently used. It is important to know the difference between using single quotes and double quotes. In this\u2026","rel":"","context":"In &quot;Optimization Tips&quot;","block_context":{"text":"Optimization Tips","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/optimization-tips\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":802,"url":"https:\/\/www.virendrachandak.com\/techtalk\/voting-functionality-in-a-website\/","url_meta":{"origin":2287,"position":5},"title":"Voting Functionality in a website","author":"Virendra Chandak","date":"April 10, 2011","format":false,"excerpt":"In this post I will give the step by step explanation of how we can add Voting Functionality to a website. At the end of this article we will have a working sample voting application. The source code for the sample voting application can be downloaded from here. We will\u2026","rel":"","context":"In &quot;Functionality&quot;","block_context":{"text":"Functionality","link":"https:\/\/www.virendrachandak.com\/techtalk\/category\/functionality\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.virendrachandak.com\/techtalk\/wp-content\/uploads\/2011\/10\/initial.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/posts\/2287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/comments?post=2287"}],"version-history":[{"count":0,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/posts\/2287\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/media?parent=2287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/categories?post=2287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.virendrachandak.com\/techtalk\/wp-json\/wp\/v2\/tags?post=2287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}