{"componentChunkName":"component---src-templates-blog-list-template-js","path":"/152","result":{"data":{"allMarkdownRemark":{"edges":[{"node":{"excerpt":"While creating Lead Generation form at LoginRadius, Marketers wanted to sure that visitors enter business emails. To that end, I created a…","fields":{"slug":"/engineering/open-source-business-email-validator-by-loginradius/"},"html":"<p>While creating Lead Generation form at LoginRadius, Marketers wanted to sure that visitors enter business emails. To that end, I created a list in JSON format to block free mail providers like Gmail, Outlook etc.</p>\n<p>Business mail validator makes sure users enters only business emails in submission forms on a web page. User can’t enter with free email’s that provided by the third party (free email) service provider.</p>\n<p>Ex. Gmail.com, Yahoo.com, Yahoomail.com, Rediff.com etc.</p>\n<p>We can classified business email validation in two ways.</p>\n<h3 id=\"1-client-side\" style=\"position:relative;\"><a href=\"#1-client-side\" aria-label=\"1 client side permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>1. Client side</strong></h3>\n<p>In client side validation we use javascript(js) OR jQuery to validate entered the email at time of submission the html form. So we can follow the following steps to validate it on client side.</p>\n<ul>\n<li>First of all create a simple html page with name emailvalidate.html</li>\n<li>\n<p>Add jQuery script on head section</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">script</span><span class=\"mtk1\"> </span><span class=\"mtk12\">src</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js&quot;</span><span class=\"mtk17\">&gt;&lt;/</span><span class=\"mtk4\">script</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n</li>\n<li>Call json file content in a script variable like</li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">script</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    var emailValidator = </span><span class=\"mtk4\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk8\">&quot;123.com&quot;</span><span class=\"mtk1\">: </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk8\">&quot;123box.net&quot;</span><span class=\"mtk1\">: </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk8\">&quot;123india.com&quot;</span><span class=\"mtk1\">: </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        …………………….</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        …………………..</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk8\">&quot;ymail.com&quot;</span><span class=\"mtk1\">: </span><span class=\"mtk4\">true</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">        </span><span class=\"mtk8\">&quot;yandex.com&quot;</span><span class=\"mtk1\">: </span><span class=\"mtk4\">true</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk4\">}</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">script</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n<p>Our complete list is available <a href=\"https://github.com/LoginRadius/business-email-validator/blob/master/src/freeEmailService.json\">here</a></p>\n<ul>\n<li>Add validation form function after you have added above code.</li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">script</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">function validateForm(id) </span><span class=\"mtk4\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                            </span><span class=\"mtk12\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">emailValue</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">jQuery</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;#&#39;</span><span class=\"mtk1\">+</span><span class=\"mtk12\">id</span><span class=\"mtk1\">).</span><span class=\"mtk11\">val</span><span class=\"mtk1\">();</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                            </span><span class=\"mtk12\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">emailArray</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">emailValue</span><span class=\"mtk1\">.</span><span class=\"mtk11\">split</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;@&quot;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                            </span><span class=\"mtk12\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">provider</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">emailArray</span><span class=\"mtk1\">[</span><span class=\"mtk7\">1</span><span class=\"mtk1\">] ? </span><span class=\"mtk12\">emailArray</span><span class=\"mtk1\">[</span><span class=\"mtk7\">1</span><span class=\"mtk1\">] : </span><span class=\"mtk8\">&#39;&#39;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                            </span><span class=\"mtk11\">for</span><span class=\"mtk1\">(</span><span class=\"mtk12\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">domain</span><span class=\"mtk1\"> </span><span class=\"mtk4\">in</span><span class=\"mtk1\"> </span><span class=\"mtk12\">emailValidator</span><span class=\"mtk1\">){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                            </span><span class=\"mtk11\">if</span><span class=\"mtk1\">(</span><span class=\"mtk12\">emailValidator</span><span class=\"mtk1\">[</span><span class=\"mtk12\">domain</span><span class=\"mtk1\">]){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                                                        </span><span class=\"mtk15\">if</span><span class=\"mtk1\">(</span><span class=\"mtk12\">domain</span><span class=\"mtk1\"> == </span><span class=\"mtk12\">provider</span><span class=\"mtk1\">){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                                                        </span><span class=\"mtk11\">alert</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;Please Provide Business Email Address.&quot;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                                                        </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">false</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                                                                        }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                                                      }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                           }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk12\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">true</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">script</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n<ul>\n<li><strong>Create html form</strong></li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">form</span><span class=\"mtk1\"> </span><span class=\"mtk12\">name</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;myForm&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">action</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;emailsubmit.php&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">onsubmit</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;return validateForm(&#39;business_email&#39;);&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">method</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;post&quot;</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;text&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">placeholder</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;Full Name&quot;</span><span class=\"mtk17\">/&gt;&lt;</span><span class=\"mtk4\">br</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;email&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">id</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;business_email&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">name</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;email&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">placeholder</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;Email Address&quot;</span><span class=\"mtk17\">/&gt;&lt;</span><span class=\"mtk4\">br</span><span class=\"mtk17\">&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk17\">&lt;</span><span class=\"mtk4\">input</span><span class=\"mtk1\"> </span><span class=\"mtk12\">type</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;submit&quot;</span><span class=\"mtk1\"> </span><span class=\"mtk12\">value</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;submit&quot;</span><span class=\"mtk17\">/&gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk17\">&lt;/</span><span class=\"mtk4\">form</span><span class=\"mtk17\">&gt;</span></span></code></pre>\n<p>Note: if you have already have html form where you want to apply this avalidator, look up for the buysiness_email and replace it accordingly.</p>\n<ul>\n<li>Save the file and try to execute this html page on a browser.</li>\n</ul>\n<h3 id=\"2-server-side\" style=\"position:relative;\"><a href=\"#2-server-side\" aria-label=\"2 server side permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>2. Server side</strong></h3>\n<p>In Server side validation we use php scripting language to validate entered email at time of submission the html form. So we can flow the following steps to validate it.</p>\n<ul>\n<li>Create a php page with name of emailsubmit.php</li>\n<li>Receive email in php post method by following code.</li>\n</ul>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"php\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&lt;?php</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">$email</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">isset</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$_POST</span><span class=\"mtk1\">[‘email’]) ? </span><span class=\"mtk11\">trim</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$_POST</span><span class=\"mtk1\">[‘email’]):’’;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">if</span><span class=\"mtk1\">(!</span><span class=\"mtk11\">empty</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$email</span><span class=\"mtk1\">)){</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                 </span><span class=\"mtk12\">$tempEmail</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">explode</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;@&#39;</span><span class=\"mtk1\">, </span><span class=\"mtk12\">$email</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                     </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk11\">isset</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$tempEmail</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&#39;1&#39;</span><span class=\"mtk1\">]) && !</span><span class=\"mtk11\">empty</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$tempEmail</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&#39;1&#39;</span><span class=\"mtk1\">])) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                 </span><span class=\"mtk12\">$validEmail</span><span class=\"mtk1\"> = </span><span class=\"mtk11\">json_decode</span><span class=\"mtk1\">(</span><span class=\"mtk11\">file_get_contents</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;freeEmailService.json&#39;</span><span class=\"mtk1\">), </span><span class=\"mtk4\">true</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                     </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk11\">is_array</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$validEmail</span><span class=\"mtk1\">) && </span><span class=\"mtk11\">in_array</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$tempEmail</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&#39;1&#39;</span><span class=\"mtk1\">], </span><span class=\"mtk11\">array_keys</span><span class=\"mtk1\">(</span><span class=\"mtk12\">$validEmail</span><span class=\"mtk1\">))) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                     </span><span class=\"mtk11\">echo</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;Please use business email address.&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span><span class=\"mtk15\">else</span><span class=\"mtk1\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">                     </span><span class=\"mtk11\">echo</span><span class=\"mtk1\"> ‘email is required field.’;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">?&gt;</span></span></code></pre>\n<ul>\n<li>Save file and upload on server</li>\n</ul>\n<p>Feel free to add, edit or modify this script as per your requirements. You can contact us if you have any queries.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk17 { color: #808080; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n</style>","frontmatter":{"date":"April 25, 2017","updated_date":null,"description":null,"title":"Open Source Business Email Validator By Loginradius","tags":["Engineering"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":0.746268656716418,"src":"/static/a657ff09e846d7d100b0fae0ea7714e9/fa668/Open-Source-Business-Validator-By-Loginradius.webp","srcSet":"/static/a657ff09e846d7d100b0fae0ea7714e9/61e93/Open-Source-Business-Validator-By-Loginradius.webp 200w,\n/static/a657ff09e846d7d100b0fae0ea7714e9/fa668/Open-Source-Business-Validator-By-Loginradius.webp 377w","sizes":"(max-width: 377px) 100vw, 377px"}}},"author":{"id":"Team LoginRadius","github":"LoginRadius","avatar":null}}}},{"node":{"excerpt":"POPUPS! They can annoy you but if used properly, they can be a boon to any marketing campaign. In 2015, Taylor wrote an article on best…","fields":{"slug":"/engineering/the-ultimate-guide-to-website-pop-ups/"},"html":"<p>POPUPS! They can annoy you but if used properly, they can be a boon to any marketing campaign. In 2015, Taylor wrote an article on best practices to use popup. While the article discussed how to optimize popup, in this article I am going to list down the types of articles and how you can implement them. I have added codes for every type of popup for a better idea.</p>\n<h3 id=\"1-creating-a-basic-popup\" style=\"position:relative;\"><a href=\"#1-creating-a-basic-popup\" aria-label=\"1 creating a basic popup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>1. Creating a basic popup:</strong></h3>\n<p><img src=\"/bd47340195d928fb4ee883951c59b738/Creating-a-simple-pop-up.webp\" alt=\"Creating a simple pop-up\"></p>\n<p>This section talks about creating a basic popup using simple HTML and CSS. There is a separate section for header, footer and content. I have also added a close button at top right corner of the popup. There are three steps to create this popup.</p>\n<h4 id=\"a-add-html-manage-a-structure-of-a-popup\" style=\"position:relative;\"><a href=\"#a-add-html-manage-a-structure-of-a-popup\" aria-label=\"a add html manage a structure of a popup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>A. Add HTML [manage a structure of a popup]</strong></h4>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">class</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;popup-content&quot;</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">span</span><span class=\"mtk1\"> </span><span class=\"mtk12\">class</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;popup-close&quot;</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">times</span><span class=\"mtk1\">;&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">span</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">class</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;popup-header&quot;</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">Header</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">div</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">class</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;popup-body&quot;</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">p</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">Your</span><span class=\"mtk1\"> </span><span class=\"mtk12\">popup</span><span class=\"mtk1\"> </span><span class=\"mtk12\">code</span><span class=\"mtk1\"> </span><span class=\"mtk12\">goes</span><span class=\"mtk1\"> </span><span class=\"mtk12\">here</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">p</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">div</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">div</span><span class=\"mtk1\"> </span><span class=\"mtk12\">class</span><span class=\"mtk1\">=</span><span class=\"mtk8\">&quot;popup-footer&quot;</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">Footer</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">div</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">div</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">div</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;\\</span></span></code></pre>\n<h4 id=\"b-add-css-display-like-a-popup\" style=\"position:relative;\"><a href=\"#b-add-css-display-like-a-popup\" aria-label=\"b add css display like a popup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>B. Add CSS [Display Like a popup]</strong></h4>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"css\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&amp;amp;lt;style&amp;amp;gt;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-layout</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">position</span><span class=\"mtk1\">: </span><span class=\"mtk8\">fixed</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">z-index</span><span class=\"mtk1\">: </span><span class=\"mtk7\">1</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">left</span><span class=\"mtk1\">: </span><span class=\"mtk7\">0</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">top</span><span class=\"mtk1\">: </span><span class=\"mtk7\">0</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">width</span><span class=\"mtk1\">: </span><span class=\"mtk7\">100%</span><span class=\"mtk1\"> ;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">height</span><span class=\"mtk1\">: </span><span class=\"mtk7\">100%</span><span class=\"mtk1\"> ;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">overflow</span><span class=\"mtk1\">: </span><span class=\"mtk8\">auto</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">background-color</span><span class=\"mtk1\">: </span><span class=\"mtk11\">rgb</span><span class=\"mtk1\">(</span><span class=\"mtk7\">0</span><span class=\"mtk1\">, </span><span class=\"mtk7\">0</span><span class=\"mtk1\">, </span><span class=\"mtk7\">0</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">background-color</span><span class=\"mtk1\">: </span><span class=\"mtk11\">rgba</span><span class=\"mtk1\">(</span><span class=\"mtk7\">0</span><span class=\"mtk1\">, </span><span class=\"mtk7\">0</span><span class=\"mtk1\">, </span><span class=\"mtk7\">0</span><span class=\"mtk1\">, </span><span class=\"mtk7\">0.4</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-header</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-footer</span><span class=\"mtk1\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">background</span><span class=\"mtk1\">: </span><span class=\"mtk8\">#29f</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">padding</span><span class=\"mtk1\">: </span><span class=\"mtk7\">20px</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">color</span><span class=\"mtk1\">: </span><span class=\"mtk8\">#fff</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">font-weight</span><span class=\"mtk1\">: </span><span class=\"mtk8\">bold</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-body</span><span class=\"mtk1\">{</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">padding</span><span class=\"mtk1\">: </span><span class=\"mtk7\">20px</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-content</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">background-color</span><span class=\"mtk1\">: </span><span class=\"mtk8\">#fefefe</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">margin</span><span class=\"mtk1\">: </span><span class=\"mtk7\">15%</span><span class=\"mtk1\"> </span><span class=\"mtk8\">auto</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">border</span><span class=\"mtk1\">: </span><span class=\"mtk7\">1px</span><span class=\"mtk1\"> </span><span class=\"mtk8\">solid</span><span class=\"mtk1\"> </span><span class=\"mtk8\">#888</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">width</span><span class=\"mtk1\">: </span><span class=\"mtk7\">60%</span><span class=\"mtk1\"> ;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-close</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">color</span><span class=\"mtk1\">: </span><span class=\"mtk8\">#FFF</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">margin</span><span class=\"mtk1\">: </span><span class=\"mtk7\">10px</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">float</span><span class=\"mtk1\">: </span><span class=\"mtk8\">right</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">font-size</span><span class=\"mtk1\">: </span><span class=\"mtk7\">28px</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">font-weight</span><span class=\"mtk1\">: </span><span class=\"mtk8\">bold</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-close:hover</span><span class=\"mtk1\">,</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk6\">.popup-close:focus</span><span class=\"mtk1\"> {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">color</span><span class=\"mtk1\">: </span><span class=\"mtk8\">black</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">text-decoration</span><span class=\"mtk1\">: </span><span class=\"mtk8\">none</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">cursor</span><span class=\"mtk1\">: </span><span class=\"mtk8\">pointer</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&amp;amp;lt;/style&amp;amp;gt;</span></span></code></pre>\n<p>Moreover, you can also check out this tutorial of <a href=\"/simple-popup-tutorial/\">creating a basic popup</a> if you want to learn the basic understanding.</p>\n<h4 id=\"c-add-script-for-action-on-close-button\" style=\"position:relative;\"><a href=\"#c-add-script-for-action-on-close-button\" aria-label=\"c add script for action on close button permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>C. Add Script [for action on close button]</strong></h4>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">popup</span><span class=\"mtk1\">\\_close = </span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-close&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">for</span><span class=\"mtk1\"> (</span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">i</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">0</span><span class=\"mtk1\">; </span><span class=\"mtk12\">i</span><span class=\"mtk1\"> &</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">; </span><span class=\"mtk12\">popup</span><span class=\"mtk1\">\\</span><span class=\"mtk12\">_close</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\">; </span><span class=\"mtk12\">i</span><span class=\"mtk1\">++) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">closeThis</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">popup</span><span class=\"mtk1\">\\</span><span class=\"mtk12\">_close</span><span class=\"mtk1\">\\[</span><span class=\"mtk12\">i</span><span class=\"mtk1\">\\];</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">closeThis</span><span class=\"mtk1\">.</span><span class=\"mtk11\">addEventListener</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;click&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk4\">function</span><span class=\"mtk1\"> () {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;none&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}, </span><span class=\"mtk4\">false</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span></code></pre>\n<h3 id=\"2-creating-a-timer-based-popup\" style=\"position:relative;\"><a href=\"#2-creating-a-timer-based-popup\" aria-label=\"2 creating a timer based popup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>2. Creating a timer based popup:</strong></h3>\n<p><img src=\"/4a93f6818c189a0fb1ca01cb37f962ff/Creating-a-timer-based-popup.gif\" alt=\"Creating a timer based popup\"></p>\n<p>This is a timer based popup which can be displayed at a certain time after the page is loaded.</p>\n<p>For reference, I have added the code to display the popup after 5 second [Add following code]. Steps are as below.</p>\n<p>Follow all the steps mentioned in section 1. (Creating a simple popup) and add the following code below that code.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;none&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk11\">setTimeout</span><span class=\"mtk1\">(</span><span class=\"mtk4\">function</span><span class=\"mtk1\"> () {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;block&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}, </span><span class=\"mtk7\">5000</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>To Auto hide after 5 second, add following code.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;block&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk11\">setTimeout</span><span class=\"mtk1\">(</span><span class=\"mtk4\">function</span><span class=\"mtk1\"> () {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;none&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}, </span><span class=\"mtk7\">5000</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span></code></pre>\n<h3 id=\"3-creating-a-scroll-popup\" style=\"position:relative;\"><a href=\"#3-creating-a-scroll-popup\" aria-label=\"3 creating a scroll popup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>3. Creating a Scroll popup:</strong></h3>\n<p>This one shows up when you scroll down the page. I have set it to 500 pixels, you can change as per requirements</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;none&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">window</span><span class=\"mtk1\">.</span><span class=\"mtk11\">onscroll</span><span class=\"mtk1\"> = </span><span class=\"mtk4\">function</span><span class=\"mtk1\"> () {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk12\">body</span><span class=\"mtk1\">.</span><span class=\"mtk12\">scrollTop</span><span class=\"mtk1\"> &</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">; </span><span class=\"mtk7\">500</span><span class=\"mtk1\"> || </span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk12\">documentElement</span><span class=\"mtk1\">.</span><span class=\"mtk12\">scrollTop</span><span class=\"mtk1\"> &</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">; </span><span class=\"mtk7\">500</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;block&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span></code></pre>\n<h3 id=\"4-creating-a-scroll--time-5-second-popup\" style=\"position:relative;\"><a href=\"#4-creating-a-scroll--time-5-second-popup\" aria-label=\"4 creating a scroll  time 5 second popup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>4. Creating a Scroll / Time [5 second] popup:</strong></h3>\n<p>Pretty much the same as above but this one shows popup after 5 seconds of scrolling .</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;none&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">window</span><span class=\"mtk1\">.</span><span class=\"mtk11\">onscroll</span><span class=\"mtk1\"> = </span><span class=\"mtk4\">function</span><span class=\"mtk1\"> () {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk12\">body</span><span class=\"mtk1\">.</span><span class=\"mtk12\">scrollTop</span><span class=\"mtk1\"> &</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">; </span><span class=\"mtk7\">500</span><span class=\"mtk1\"> || </span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk12\">documentElement</span><span class=\"mtk1\">.</span><span class=\"mtk12\">scrollTop</span><span class=\"mtk1\"> &</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">; </span><span class=\"mtk7\">500</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk11\">setTimeout</span><span class=\"mtk1\">(</span><span class=\"mtk4\">function</span><span class=\"mtk1\"> () {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;block&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">},</span><span class=\"mtk7\">5000</span><span class=\"mtk1\"> }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span></code></pre>\n<h3 id=\"5-creating-an-exit-popup\" style=\"position:relative;\"><a href=\"#5-creating-an-exit-popup\" aria-label=\"5 creating an exit popup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>5. Creating an Exit popup:</strong></h3>\n<p><img src=\"/c718dfa91184e4494f4d856fd051d640/Creating-an-exit-popup.gif\" alt=\"Creating an exit popup\"></p>\n<p>Only confirmation alert popup will show and you can’t make changes in html of this popup. Use following line of code on a single page.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"7\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">window</span><span class=\"mtk1\">.</span><span class=\"mtk11\">onbeforeunload</span><span class=\"mtk1\"> = </span><span class=\"mtk4\">function</span><span class=\"mtk1\">() {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk8\">&quot;You are about to leave&quot;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>There is another variation you can make here. In this scenario, if the user moves his cursor beyond the browser screen, you can create a popup to convince the user to stay. Below is the line of code you will need.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"8\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;none&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">addEventListener</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;mouseout&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk4\">function</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">event</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementsByClassName</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;popup-layout&#39;</span><span class=\"mtk1\">)\\[</span><span class=\"mtk7\">0</span><span class=\"mtk1\">\\].</span><span class=\"mtk12\">style</span><span class=\"mtk1\">.</span><span class=\"mtk12\">display</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;block&quot;</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">});</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">lt</span><span class=\"mtk1\">;/</span><span class=\"mtk12\">script</span><span class=\"mtk1\">&</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">amp</span><span class=\"mtk1\">;</span><span class=\"mtk12\">gt</span><span class=\"mtk1\">;</span></span></code></pre>\n<p>So guys, I hope this guide helped you through various types of popups. If you love animating your pop-up, you might want to check out this tutorial of <a href=\"/animating-simple-css-popup-tutorial/\">creating an animated CSS pop-up</a>. Do try them and let us know your experiences.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk6 { color: #D7BA7D; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n</style>","frontmatter":{"date":"April 20, 2017","updated_date":null,"description":null,"title":"Know The Types of Website Popups and How to Create Them","tags":["CSS"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7699115044247788,"src":"/static/d404c01e7d4da26cf8ec6404c910921c/5239a/The-Ultimate-guide-to-website-pop-ups.webp","srcSet":"/static/d404c01e7d4da26cf8ec6404c910921c/61e93/The-Ultimate-guide-to-website-pop-ups.webp 200w,\n/static/d404c01e7d4da26cf8ec6404c910921c/1f5c5/The-Ultimate-guide-to-website-pop-ups.webp 400w,\n/static/d404c01e7d4da26cf8ec6404c910921c/5239a/The-Ultimate-guide-to-website-pop-ups.webp 560w","sizes":"(max-width: 560px) 100vw, 560px"}}},"author":{"id":"Team LoginRadius","github":"LoginRadius","avatar":null}}}},{"node":{"excerpt":"JavaScript or JS helps implement complex things on web pages. Many of the developers know the importance of an minified Javascript file but…","fields":{"slug":"/engineering/16-javascript-hacks-for-optimization/"},"html":"<p>JavaScript or JS helps implement complex things on web pages. Many of the developers know the importance of an minified Javascript file but few are aware of an Optimized Javascript code.</p>\n<p>An optimized code is a combination of smartly programmed logics and small hacks to optimize performance, speed and save time.</p>\n<p>Here are sweet 16 <strong>JS hacks and tips</strong> for developers  for optimizing Javascript to improve JS performance and improve execution time without affecting server resources.</p>\n<h3 id=\"1-use-array-filter\" style=\"position:relative;\"><a href=\"#1-use-array-filter\" aria-label=\"1 use array filter permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>1. Use Array Filter</strong></h3>\n<p>It is a small hack to filter out bucket of elements from the array pool. This method creates an array filled with all array elements that pass a test (provided as a function). According to requirement create a callback function for non-required elements.</p>\n<p>In below example the bucket elements are <em>null</em> and are ready to get filtered out. </p>\n<p>Example:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">schema</span><span class=\"mtk1\"> = [</span><span class=\"mtk8\">&quot;hi&quot;</span><span class=\"mtk1\">,</span><span class=\"mtk8\">&quot;ihaveboyfriend&quot;</span><span class=\"mtk1\">,</span><span class=\"mtk4\">null</span><span class=\"mtk1\">, </span><span class=\"mtk4\">null</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;goodbye&quot;</span><span class=\"mtk1\">]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">schema</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">schema</span><span class=\"mtk1\">.</span><span class=\"mtk11\">filter</span><span class=\"mtk1\">(</span><span class=\"mtk4\">function</span><span class=\"mtk1\">(</span><span class=\"mtk12\">n</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk12\">n</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> });</span></span></code></pre>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">Output: [&quot;hi&quot;,&quot;ihaveboyfriend&quot;, &quot;goodbye&quot;]</span></code></pre>\n<p>This hack will save some time and lines of codes for developers.</p>\n<h3 id=\"2-using-string-replace-function-to-replace-all-the-values\" style=\"position:relative;\"><a href=\"#2-using-string-replace-function-to-replace-all-the-values\" aria-label=\"2 using string replace function to replace all the values permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>2. Using String replace function to replace all the values</strong></h3>\n<p><em>The String.replace()</em> <em>function</em> allows you to replace strings using String and Regex.</p>\n<p>Basically this function replaces the string at its first occurrence. But to replace all using <em>replaceAll()</em> function, use <em>/g</em> at the end of a Regex:</p>\n<p>Example:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">string</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;login login&quot;</span><span class=\"mtk1\">; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">string</span><span class=\"mtk1\">.</span><span class=\"mtk11\">replace</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&quot;in&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;out&quot;</span><span class=\"mtk1\">)); </span><span class=\"mtk3\">// &quot;logout login&quot; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">string</span><span class=\"mtk1\">.</span><span class=\"mtk11\">replace</span><span class=\"mtk1\">(</span><span class=\"mtk5\">/in/</span><span class=\"mtk4\">g</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;out&quot;</span><span class=\"mtk1\">)); </span><span class=\"mtk3\">//&quot;logout logout&quot;</span></span></code></pre>\n<h3 id=\"3use-breakpoints-and-console-for-debugging\" style=\"position:relative;\"><a href=\"#3use-breakpoints-and-console-for-debugging\" aria-label=\"3use breakpoints and console for debugging permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>3. Use breakpoints and Console for Debugging</strong></h3>\n<p>With the help of <strong>breakpoints</strong> or <strong>debugging points</strong> you can set multiple barriers to rectify source of error at every barrier. </p>\n<p><img src=\"/992c71b11d837822cbd06b34a3aa6a64/Use-breakpoints-and-Console-for-Debugging-1.webp\" alt=\"Use breakpoints and Console for Debugging\"></p>\n<p>Press F11 for next call function and f8 to resume script execution.</p>\n<p><img src=\"/b8654e35d670696359fad0c72a2cc5e2/Use-breakpoints-and-Console-for-Debugging-2.webp\" alt=\"Use breakpoints and Console for Debugging\"></p>\n<p>You can also check what dynamic values are generated by a function, using console and can check output on different values.</p>\n<h3 id=\"4-convert-to-floating-number-without-killing-performance\" style=\"position:relative;\"><a href=\"#4-convert-to-floating-number-without-killing-performance\" aria-label=\"4 convert to floating number without killing performance permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>4. Convert to floating number without killing performance</strong></h3>\n<p>Often we use <strong>math.floor</strong>, <strong>math.ceil</strong> and <strong>math.round</strong> for eliminating decimals. Instead of using them <strong>use “~~”</strong> to eliminate decimals for a value.</p>\n<p>It is also helpful in increasing performance when it comes to micro optimizations in a code.</p>\n<p><strong>Example:</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">Use</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">~~ (</span><span class=\"mtk12\">math</span><span class=\"mtk1\">.</span><span class=\"mtk12\">random</span><span class=\"mtk1\">*</span><span class=\"mtk7\">100</span><span class=\"mtk1\">)</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">Instead</span><span class=\"mtk1\"> </span><span class=\"mtk4\">of</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">math</span><span class=\"mtk1\">.</span><span class=\"mtk11\">round</span><span class=\"mtk1\">(</span><span class=\"mtk12\">math</span><span class=\"mtk1\">.</span><span class=\"mtk12\">random</span><span class=\"mtk1\">*</span><span class=\"mtk7\">100</span><span class=\"mtk1\">)</span></span></code></pre>\n<h3 id=\"5-using-length-to-delete-empty-in-an-array\" style=\"position:relative;\"><a href=\"#5-using-length-to-delete-empty-in-an-array\" aria-label=\"5 using length to delete empty in an array permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>5. Using length to delete empty in an array</strong></h3>\n<p>This technique will help you in resizing and emptying an array.</p>\n<p>For deleting n elements in an Array, use <em><strong>array.length</strong></em>. </p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">n</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">See</span><span class=\"mtk1\"> </span><span class=\"mtk4\">this</span><span class=\"mtk1\"> example:</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array</span><span class=\"mtk1\"> = [</span><span class=\"mtk7\">1</span><span class=\"mtk1\">, </span><span class=\"mtk7\">2</span><span class=\"mtk1\">, </span><span class=\"mtk7\">3</span><span class=\"mtk1\">, </span><span class=\"mtk7\">4</span><span class=\"mtk1\">, </span><span class=\"mtk7\">5</span><span class=\"mtk1\">, </span><span class=\"mtk7\">6</span><span class=\"mtk1\">]; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\">); </span><span class=\"mtk3\">// 6 </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">3</span><span class=\"mtk1\">; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\">); </span><span class=\"mtk3\">// 3 </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">); </span><span class=\"mtk3\">// [1,2,3]</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">For</span><span class=\"mtk1\"> **</span><span class=\"mtk12\">emptying</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array</span><span class=\"mtk1\">** </span><span class=\"mtk12\">use</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">0</span><span class=\"mtk1\">;.</span></span></code></pre>\n<p><strong>Example:</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array</span><span class=\"mtk1\"> = [</span><span class=\"mtk7\">1</span><span class=\"mtk1\">, </span><span class=\"mtk7\">2</span><span class=\"mtk1\">, </span><span class=\"mtk7\">3</span><span class=\"mtk1\">, </span><span class=\"mtk7\">4</span><span class=\"mtk1\">, </span><span class=\"mtk7\">5</span><span class=\"mtk1\">, </span><span class=\"mtk7\">6</span><span class=\"mtk1\">]; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\"> = </span><span class=\"mtk7\">0</span><span class=\"mtk1\">; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">length</span><span class=\"mtk1\">); </span><span class=\"mtk3\">// 0 </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">); </span><span class=\"mtk3\">// []</span></span></code></pre>\n<p>This technique is <strong>mostly preferred</strong> over any other methods to resize/unset the array elements and is one of the <strong>best javascript practices</strong> most of the developers follow.</p>\n<h3 id=\"6-merging-arrays-without-causing-server-load\" style=\"position:relative;\"><a href=\"#6-merging-arrays-without-causing-server-load\" aria-label=\"6 merging arrays without causing server load permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>6. Merging arrays without causing server load</strong></h3>\n<p>If your requirement is of <strong>merging two arrays</strong>, use Array.concat() function</p>\n<p>For merging two arrays:</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array1</span><span class=\"mtk1\"> = [</span><span class=\"mtk7\">1</span><span class=\"mtk1\">, </span><span class=\"mtk7\">2</span><span class=\"mtk1\">, </span><span class=\"mtk7\">3</span><span class=\"mtk1\">]; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array2</span><span class=\"mtk1\"> = [</span><span class=\"mtk7\">4</span><span class=\"mtk1\">, </span><span class=\"mtk7\">5</span><span class=\"mtk1\">, </span><span class=\"mtk7\">6</span><span class=\"mtk1\">]; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array1</span><span class=\"mtk1\">.</span><span class=\"mtk11\">concat</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array2</span><span class=\"mtk1\">)); </span><span class=\"mtk3\">// [1,2,3,4,5,6]; </span></span></code></pre>\n<p>This function works best for small arrays.</p>\n<p>To <strong>merge large arrays</strong> we use</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"7\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk10\">Array</span><span class=\"mtk1\">.</span><span class=\"mtk12\">push</span><span class=\"mtk1\">.</span><span class=\"mtk11\">apply</span><span class=\"mtk1\">(</span><span class=\"mtk12\">arr1</span><span class=\"mtk1\">, </span><span class=\"mtk12\">arr2</span><span class=\"mtk1\">)</span></span></code></pre>\n<p>Reason is using Array.concat() function on large arrays will <strong>consume lot of memory</strong> while creating a separate new array.</p>\n<p>In this case, you can use Array.push.apply(arr1, arr2) which instead will merge the second array in the first one, hence <strong>reducing the memory usage</strong>.</p>\n<p><strong>Example:</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"8\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array1</span><span class=\"mtk1\"> = [</span><span class=\"mtk7\">1</span><span class=\"mtk1\">, </span><span class=\"mtk7\">2</span><span class=\"mtk1\">, </span><span class=\"mtk7\">3</span><span class=\"mtk1\">]; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array2</span><span class=\"mtk1\"> = [</span><span class=\"mtk7\">4</span><span class=\"mtk1\">, </span><span class=\"mtk7\">5</span><span class=\"mtk1\">, </span><span class=\"mtk7\">6</span><span class=\"mtk1\">]; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array1</span><span class=\"mtk1\">.</span><span class=\"mtk12\">push</span><span class=\"mtk1\">.</span><span class=\"mtk11\">apply</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array1</span><span class=\"mtk1\">, </span><span class=\"mtk12\">array2</span><span class=\"mtk1\">)); </span><span class=\"mtk3\">// [1,2,3,4,5,6];</span></span></code></pre>\n<p>It will also optimize the performance of your Javascript code irrespective of size of array.</p>\n<h3 id=\"7-use-splice-to-delete-array-elements\" style=\"position:relative;\"><a href=\"#7-use-splice-to-delete-array-elements\" aria-label=\"7 use splice to delete array elements permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>7. Use splice  to delete array elements</strong></h3>\n<p>This is probably the one of the best <strong>optimization tips for javascript</strong>. It <strong>optimizes speed</strong> of your JS code.</p>\n<p>Using splice instead of delete is a good practice, it will save some”null/undefined space” in your code.</p>\n<p>The downside of <strong>using delete</strong> is it will delete the object property, but will <strong>not reindex the array</strong> or update its length, leaving undefined values. Also it consumes a-lot of time in execution.</p>\n<p>Using <em>splice</em></p>\n<p>Example</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"9\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">myArray</span><span class=\"mtk1\"> = [</span><span class=\"mtk8\">&quot;a&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;b&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;c&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;d&quot;</span><span class=\"mtk1\">] </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">myArray</span><span class=\"mtk1\">.</span><span class=\"mtk11\">splice</span><span class=\"mtk1\">(</span><span class=\"mtk7\">0</span><span class=\"mtk1\">, </span><span class=\"mtk7\">2</span><span class=\"mtk1\">) [</span><span class=\"mtk8\">&quot;a&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;b&quot;</span><span class=\"mtk1\">]</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">Result: </span><span class=\"mtk12\">myArray</span><span class=\"mtk1\"> [</span><span class=\"mtk8\">&quot;c&quot;</span><span class=\"mtk1\">, </span><span class=\"mtk8\">&quot;d&quot;</span><span class=\"mtk1\">]</span></span></code></pre>\n<h3 id=\"8-checking-values-in-an-object\" style=\"position:relative;\"><a href=\"#8-checking-values-in-an-object\" aria-label=\"8 checking values in an object permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>8. Checking values in an Object</strong></h3>\n<p>To check whether an object is empty or not,  use</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"10\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk10\">Object</span><span class=\"mtk1\">.</span><span class=\"mtk11\">keys</span><span class=\"mtk1\">(</span><span class=\"mtk12\">YOUR</span><span class=\"mtk1\">\\</span><span class=\"mtk12\">_OBJECT</span><span class=\"mtk1\">).</span><span class=\"mtk12\">length</span><span class=\"mtk1\"> </span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk3\">// 0 returns if object is empty</span></span></code></pre>\n<p>Following code return the number of elements in an Object.</p>\n<h3 id=\"9-cache-the-variable\" style=\"position:relative;\"><a href=\"#9-cache-the-variable\" aria-label=\"9 cache the variable permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>9. Cache the variable</strong></h3>\n<p>Caching the variable tremendously <strong>increase javascript performance</strong>.</p>\n<p>Everytime we use document.getElementById() or getElementsByClassName(), JS travels through all elements repeatedly upon each similar element request.</p>\n<p>In Order to boost performance, <strong>cache your selections</strong> to some variable (if using the same selection multiple times).</p>\n<p><strong>Example:</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"11\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">cached</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">document</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getElementById</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;someElement&#39;</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">cached</span><span class=\"mtk1\">.</span><span class=\"mtk11\">addClass</span><span class=\"mtk1\">(</span><span class=\"mtk8\">&#39;cached-element&#39;</span><span class=\"mtk1\">);</span></span></code></pre>\n<p>It is a simple <strong>optimization tip</strong> with drastic impact on performance, recommended for <strong>processing large arrays in loop(s)</strong>.</p>\n<p>Check this <a href=\"http://jquery-howto.blogspot.in/2008/12/caching-in-jquery.html\">link</a> for performance results.</p>\n<h3 id=\"10-use-switch-case-instead-of-ifelse\" style=\"position:relative;\"><a href=\"#10-use-switch-case-instead-of-ifelse\" aria-label=\"10 use switch case instead of ifelse permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>10. Use switch case instead of if/else</strong></h3>\n<p>Generally switch cases are used over if/else statements to <strong>perform almost the same tasks</strong>.</p>\n<p>The fact that in switch statements  expression to test is only evaluated once, execution time becomes less for the script compared to if/else where for every if , it has to be evaluated.</p>\n<h3 id=\"11-short-circuits-conditionals\" style=\"position:relative;\"><a href=\"#11-short-circuits-conditionals\" aria-label=\"11 short circuits conditionals permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>11. Short-circuits conditionals</strong></h3>\n<p>Short circuiting  is when a logical operator doesn't evaluate all its arguments.</p>\n<p>The code</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"12\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">loggedin</span><span class=\"mtk1\">) { </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk12\">welcome</span><span class=\"mtk1\">\\</span><span class=\"mtk11\">_messege</span><span class=\"mtk1\">();</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> }</span></span></code></pre>\n<p>Make it short by using combination of a verified variable and a function using <em>&#x26;&#x26;</em> (AND operator) in between both.</p>\n<p> Now above code can be made in one line</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"13\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk12\">loggedin</span><span class=\"mtk1\"> && </span><span class=\"mtk12\">welcome</span><span class=\"mtk1\">\\</span><span class=\"mtk11\">_messege</span><span class=\"mtk1\">();</span></span></code></pre>\n<h3 id=\"12-getting-the-last-item-in-the-array\" style=\"position:relative;\"><a href=\"#12-getting-the-last-item-in-the-array\" aria-label=\"12 getting the last item in the array permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>12. Getting the last item in the array</strong></h3>\n<p><em>Array.prototype.slice(begin, end)</em> is used to cut arrays when you set the start and end arguments.  But if you don't set the end argument, this function will automatically set the max value for the array.</p>\n<p>A smart hack is it can also accept negative values and by setting a negative number as begin argument, you will get the last elements from the array.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"14\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">array</span><span class=\"mtk1\"> = [</span><span class=\"mtk7\">1</span><span class=\"mtk1\">, </span><span class=\"mtk7\">2</span><span class=\"mtk1\">, </span><span class=\"mtk7\">3</span><span class=\"mtk1\">, </span><span class=\"mtk7\">4</span><span class=\"mtk1\">, </span><span class=\"mtk7\">5</span><span class=\"mtk1\">, </span><span class=\"mtk7\">6</span><span class=\"mtk1\">]; </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk11\">slice</span><span class=\"mtk1\">(-</span><span class=\"mtk7\">1</span><span class=\"mtk1\">)); </span><span class=\"mtk3\">// [6] </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk11\">slice</span><span class=\"mtk1\">(-</span><span class=\"mtk7\">2</span><span class=\"mtk1\">)); </span><span class=\"mtk3\">// [5,6] </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk10\">console</span><span class=\"mtk1\">.</span><span class=\"mtk11\">log</span><span class=\"mtk1\">(</span><span class=\"mtk12\">array</span><span class=\"mtk1\">.</span><span class=\"mtk11\">slice</span><span class=\"mtk1\">(-</span><span class=\"mtk7\">3</span><span class=\"mtk1\">)); </span><span class=\"mtk3\">// [4,5,6]</span></span></code></pre>\n<h3 id=\"13-default-values-using--operator\" style=\"position:relative;\"><a href=\"#13-default-values-using--operator\" aria-label=\"13 default values using  operator permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>13. Default values using || operator</strong></h3>\n<p>In JS there is a basic rule of having a default value otherwise process will halt at undefined values.</p>\n<p>To provide default value in a variable use || to stay away from this most common issue.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"15\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">a</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">a</span><span class=\"mtk1\"> || </span><span class=\"mtk8\">&#39;hello&#39;</span></span></code></pre>\n<p>The developer must check whether there are any conflicting values that might be passed to the function to avoid Bugs.</p>\n<h3 id=\"14-beautifying-js-code\" style=\"position:relative;\"><a href=\"#14-beautifying-js-code\" aria-label=\"14 beautifying js code permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>14. Beautifying JS code</strong></h3>\n<p>For beautifying your Javascript  code use <a href=\"http://jsbeautifier.org/\">jsbeautifier</a>. It formats a clumsy JS code into well structured code.</p>\n<p><strong>Code before Beautifying</strong></p>\n<p><img src=\"/ffb7a1c2536dd770e56424c03482dcb5/Beautifying-JS-code-2.webp\" alt=\"Beautifying JS code 1\"></p>\n<p><strong>Code after Beautifying</strong></p>\n<p><img src=\"/e10fa72828d50c5d23c2b68009ba432e/Beautifying-JS-code-1.webp\" alt=\"Beautifying JS code 2\"></p>\n<h3 id=\"15-checking-js-performance\" style=\"position:relative;\"><a href=\"#15-checking-js-performance\" aria-label=\"15 checking js performance permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>15. Checking JS Performance</strong></h3>\n<p>To check how well a Javascript code is performing and share results use jsperf. It is easiest way to create and share testcases.</p>\n<h3 id=\"16-online-javascript-editor\" style=\"position:relative;\"><a href=\"#16-online-javascript-editor\" aria-label=\"16 online javascript editor permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>16. Online javascript editor</strong></h3>\n<p><a href=\"http://jsfiddle.net/\">Jsfiddle</a> and <a href=\"http://jsbin.com/\">jsbin</a> is a tool for experimenting with your Javascript code and other web languages.</p>\n<p>It is also a code sharing site. As you type into one of the editor panels the output is generated in real-time in the output panel.</p>\n<p>These are some useful hacks and tips for optimizing javascript performance. It is not mandatory to use them all the time because cases and conditions will vary. If you have tricks other than these, do share with us in comment section.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n  .dark-default-dark .mtk5 { color: #D16969; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n</style>","frontmatter":{"date":"April 07, 2017","updated_date":null,"description":"Learn how to optimize performance using some useful javascript hacks, tips and tricks.","title":"Javascript tips and tricks to Optimize Performance","tags":["Engineering","JavaScript","Hacks","Array"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.3793103448275863,"src":"/static/0d6472e55ba0b111b3dfa895ec2dec57/7f8e9/16-JavaScript-Hacks-to-save-time-and-boost-productivity-768x555.webp","srcSet":"/static/0d6472e55ba0b111b3dfa895ec2dec57/61e93/16-JavaScript-Hacks-to-save-time-and-boost-productivity-768x555.webp 200w,\n/static/0d6472e55ba0b111b3dfa895ec2dec57/1f5c5/16-JavaScript-Hacks-to-save-time-and-boost-productivity-768x555.webp 400w,\n/static/0d6472e55ba0b111b3dfa895ec2dec57/7f8e9/16-JavaScript-Hacks-to-save-time-and-boost-productivity-768x555.webp 768w","sizes":"(max-width: 768px) 100vw, 768px"}}},"author":{"id":"Team LoginRadius","github":"LoginRadius","avatar":null}}}},{"node":{"excerpt":"WHO has pointed out “stress” as the “global health epidemic of 21st century” and it is estimated that it will cost nearly $300 billion every…","fields":{"slug":"/growth/10-smart-tips-to-make-you-more-resilient-at-office/"},"html":"<p>WHO has pointed out “stress” as the “<a href=\"http://scitechconnect.elsevier.com/stress-health-epidemic-21st-century/\">global health epidemic of 21st century</a>” and it is estimated that it will cost <a href=\"http://www.businessnewsdaily.com/2267-workplace-stress-health-epidemic-perventable-employee-assistance-programs.html\">nearly $300 billion every year</a> to American businesses. OMG! That’s a hell lot of money invested (wasted if we can solve it the other way). Studies clear how important it is to fight stress and make things fantastically work even during tough times. Now, with most of us working at highly demanding, always-on, and constantly connected work cultures, how is it possible to stay resilient and sail against all the odds? Well, it is possible and keep in mind that being resilient is only mantra to succeed in your lives. Remember Thomas Edison who failed 1000 times to invent a bulb, too resilient was he! So, <strong><em>why can’t we</em></strong> and <strong><em>why don’t we</em></strong> stop being so delicate? Bounce back fellas and let others see you shine at your workplace with these 10 effective attitude-reforming pills.</p>\n<blockquote>\n<p><em>Resilience is not endurance, it is how you bounce back from your situations</em></p>\n</blockquote>\n<h3 id=\"imagine-a-boxing-match\" style=\"position:relative;\"><a href=\"#imagine-a-boxing-match\" aria-label=\"imagine a boxing match permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Imagine A Boxing Match</strong></h3>\n<p>Think that you step into a ring and get hit by another boxer. Now, when it’s time-out, you will examine your damage, and think about the measures you should take. You can also take advice from friends and family as if they are your coach. At last, you bounce back with a plan. That’s what resilience is all about. You always bounce back with all your might you can gather.</p>\n<h3 id=\"practice-alertness\" style=\"position:relative;\"><a href=\"#practice-alertness\" aria-label=\"practice alertness permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Practice Alertness</strong></h3>\n<p>You have to meter your alertness and turn towards ways to improve it. Many companies are on the path to introduce mental training sessions that are related to alertness in their professional preliminaries. Julie Corlis, the executive editor of Harvard Heart Letter shows that practicing mindfulness meditation practices can <a href=\"http://www.health.harvard.edu/blog/mindfulness-meditation-may-ease-anxiety-mental-stress-201401086967\">lower stress rates in employees and enhance resilience and commitment to work</a>. The good news is that many online programmes like B<a href=\"https://www.bemindfulonline.com/\">e Mindful Online</a> and Mind The Moment are available to serve the purpose. There are some good books and apps you can refer like:-</p>\n<p><strong>Books</strong>- <a href=\"https://www.amazon.com/Mindfulness-Eight-Week-Finding-Peace-Frantic-ebook/dp/B005NJ2T1G\">Mindfulness: An Eight-Week Plan for Finding Peace in a Frantic World</a>, <a href=\"http://www.amazon.in/Anti-Stress-Dot---Dot-Beautiful-Colouring/dp/0752265865/ref=sr_1_4?tag=geniuslink0e-21&#x26;ie=UTF8&#x26;qid=1450456674&#x26;sr=8-4&#x26;keywords=books+mindfulness\">Anti-Stress Dot-to-Dot: Beautiful, calming pictures to complete yourself</a></p>\n<p><strong>Some Apps</strong>- Mental Workout (<a href=\"https://itunes.apple.com/us/app/lumosity-daily-brain-games/id577232024?mt=8\">iOS</a> &#x26; <a href=\"https://play.google.com/store/apps/details?id=com.lumoslabs.lumosity\">Android</a>), Simple Habit (<a href=\"https://play.google.com/store/apps/details?id=com.simplehabit.simplehabitapp&#x26;hl=en\">iOS</a> &#x26; <a href=\"https://play.google.com/store/apps/details?id=com.simplehabit.simplehabitapp&#x26;hl=en\">Android</a>), Headspace (<a href=\"https://itunes.apple.com/us/app/headspace-guided-meditation-and-mindfulness/id493145008?mt=8\">iOS</a> &#x26; <a href=\"https://play.google.com/store/apps/details?id=com.getsomeheadspace.android&#x26;hl=en\">Android</a>)</p>\n<h3 id=\"have-a-positive-mental-attitude-pma\" style=\"position:relative;\"><a href=\"#have-a-positive-mental-attitude-pma\" aria-label=\"have a positive mental attitude pma permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Have a Positive Mental Attitude (PMA)</strong></h3>\n<p>Have an optimistic outlook to life to keep you going even when you are down and out. Optimism is not ignoring your problems. Instead, it is thinking that the issues which you are going to face are temporary and you will tackle them with your skills. Believe in yourself and have faith in your instincts when things go wrong. Moreover, realize that the negative things do not last for a long time. This will help you bring back your positivity.</p>\n<h3 id=\"compartmentalize-your-mental-load\" style=\"position:relative;\"><a href=\"#compartmentalize-your-mental-load\" aria-label=\"compartmentalize your mental load permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Compartmentalize your Mental Load</strong></h3>\n<p>Out of 11 million bits of data coming into our brain every second, our conscious mind can only deal with <a href=\"https://www.forbes.com/sites/nickmorgan/2013/03/07/how-to-master-yourself-your-unconscious-and-the-people-around-you-3/#4d40e2fc6762\">40 bits per second</a>. Thus, handle your mind like you handle your mailbox. Treat your brain like a mailbox and compartmentalize your mental load. You should categorize your mental tasks like meetings, problem-solving sessions, and emailing. Try to not to switch randomly between jobs and enjoy one job at a time. It will decrease your mental strain.</p>\n<h3 id=\"embrace-your-stress\" style=\"position:relative;\"><a href=\"#embrace-your-stress\" aria-label=\"embrace your stress permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Embrace your Stress</strong></h3>\n<p>Yes, embrace your stress. Understand that you can smile or you can cry but you cannot escape from stress. So, relax for sometime and then work upon your stress.</p>\n<h3 id=\"improve-your-mental-agility\" style=\"position:relative;\"><a href=\"#improve-your-mental-agility\" aria-label=\"improve your mental agility permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Improve Your Mental Agility</strong></h3>\n<p>Improving mental agility means improving your quickness to understand the situation. You have to decenter stress to manage the problem effectively. Thus, when you tackle a problem, you will take a pause, observe the situation from a neutral point of view and then come up with a solution.</p>\n<h3 id=\"develop-compassion\" style=\"position:relative;\"><a href=\"#develop-compassion\" aria-label=\"develop compassion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Develop Compassion</strong></h3>\n<p>It is very necessary to develop compassion for yourself and for others if you want develop resilience. Greater Good Science Center located at UC Berkeley has researched that <a href=\"http://greatergood.berkeley.edu/article/item/compassion_across_cubicles\">being compassionate improves</a> work relationships and enhances collaboration and cooperation at workplace. Developing compassion also decreases stress and increases happiness. It is difficult for an organization, a team or an individual to succeed without compassion.</p>\n<h3 id=\"applaud-yourself-for-doing-well\" style=\"position:relative;\"><a href=\"#applaud-yourself-for-doing-well\" aria-label=\"applaud yourself for doing well permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Applaud yourself for Doing Well</strong></h3>\n<p>It is a habit which can be practiced everywhere, especially at workplace. Work hard on your bloopers but party harder when you have succeeded. Hence, keep in mind to pat your back for at least a thing you did well at the end of the day. And even if nothing goes right, pat your back for your sincere efforts and learn from your mistakes. It will keep you away from the negative aura.</p>\n<h3 id=\"be-flexible\" style=\"position:relative;\"><a href=\"#be-flexible\" aria-label=\"be flexible permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Be Flexible</strong></h3>\n<p>It is common to experience change in work environments. Projects you are a part of can get altered or may be even dropped however accepting that things do change and if possible embracing those changes can make you more resilient.</p>\n<h3 id=\"stay-healthy-always\" style=\"position:relative;\"><a href=\"#stay-healthy-always\" aria-label=\"stay healthy always permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Stay Healthy Always</strong></h3>\n<p>Now, last but certainly not the least, always stay healthy. Physical fitness is as important as mental fitness. It is easier to handle challenges when you are healthy. Therefore, eat healthy, exercise regularly, avoid drinking and smoking, and get good amount of sleep.</p>\n<p>Being resilient will help you cope with stress in the best way possible. Moreover, companies too are benefited from resilient workforces. Hence, cultivating an organizational work culture which backs compassion and promotes resilience training is a wise business step. However, resilience evolves from your daily habits and attitude and needs determined focus which is applied consistently.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"April 07, 2017","updated_date":null,"description":"Stop being so delicate at your failures. Rise like a Phoenix at work by working out these wonderful habits practiced by resilient people.","title":"10 Smart Tips to Make You More Resilient At Office","tags":["Engineering"],"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7699115044247788,"src":"/static/3684582a5f31c4b889d19e00cc0b7c05/5239a/10-Smart-Tips-to-Make-You-More-Resilient-At-Office.webp","srcSet":"/static/3684582a5f31c4b889d19e00cc0b7c05/61e93/10-Smart-Tips-to-Make-You-More-Resilient-At-Office.webp 200w,\n/static/3684582a5f31c4b889d19e00cc0b7c05/1f5c5/10-Smart-Tips-to-Make-You-More-Resilient-At-Office.webp 400w,\n/static/3684582a5f31c4b889d19e00cc0b7c05/5239a/10-Smart-Tips-to-Make-You-More-Resilient-At-Office.webp 560w","sizes":"(max-width: 560px) 100vw, 560px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}},{"node":{"excerpt":"For me, doing is what I believe in and nothing disturbs me more than the feeling, that I could have done it but I didn’t try. At my…","fields":{"slug":"/growth/fight-mediocrity-at-your-workplace/"},"html":"<p>For me, doing is what I believe in and nothing disturbs me more than the feeling, that I could have done it but I didn’t try. At my workplace, I know many individuals who want to make a big splash. They even give it a shot but gradually, they adjust with their average performance and start loving their comfort zones. Well, this problem lies within us all. We all are constantly getting breeded to stay <em>mediocres</em>. Going to college, getting a decent job, getting married and having kids, and then waiting for death. It may be a good life but it isn’t great. And if you have to get something great, you have to leave the good behind. So, do you agree with me and want to break the monotony? These incredible habits can help you make a million-dollar partner to your your company.</p>\n<h3 id=\"embrace-your-heroes\" style=\"position:relative;\"><a href=\"#embrace-your-heroes\" aria-label=\"embrace your heroes permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Embrace Your Heroes</strong></h3>\n<p>We all have idols. Look upon them at this hour of need. Think what would your heroes do if they were facing your situations. Will they just be happy with this current profile you are working at? Will they like your mundane routine of your work? And how would they like to change it? These questions will be definitely difficult but working upon them will break the monotony.</p>\n<h3 id=\"take-ownership-of-what-you-do\" style=\"position:relative;\"><a href=\"#take-ownership-of-what-you-do\" aria-label=\"take ownership of what you do permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Take ownership of What You Do</strong></h3>\n<p>How many times did you point others for your failures at your office? There is nothing as sick as blaming others for your failures. By blaming them, you give them power to control your lives and believe me, you would not love doing that. Instead learn to accept things and embrace learning to improve it. Moreover, treat yourself as a partner at your workplace. When you take a job, do not do it as an employee who is doing it for the sake of getting paid. Do not follow your monotonous 9 to 6 routine as well. Believe in your organization’s vision and be happy because you feel that you are being a part of a plan which is greater than a person.</p>\n<h3 id=\"know-your-co-workers-and-customers\" style=\"position:relative;\"><a href=\"#know-your-co-workers-and-customers\" aria-label=\"know your co workers and customers permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Know Your Co-workers and Customers</strong></h3>\n<p>You might have heard about “Love Thy Neighbor”. Well, the greatest commandment at workplace is- “Love Your Coworkers”. A manager who builds a relationship with his staff is much better than he who manages his employees and this feeling is not restricted at leadership level. But can be practiced at any levels in the organization. Moreover, love your customers or end-users as well because if you love them, you can create better products for them. Hence, you win at both ends.</p>\n<p>Prioritize your goals at work starting from:-</p>\n<ul>\n<li>Principals</li>\n<li>People (coworkers (well ,now call them partners) and end-users). If you care for these important people, all other things will automatically come to you.</li>\n<li>Product.</li>\n<li>Profit. </li>\n</ul>\n<p>Meet your coworkers outside your workplace. Indulge with them in some sports as <a href=\"http://www.sciencedirect.com/science/article/pii/S1469029212001343\">20 minutes of sport can enhance mood up to 12 hours</a>. Thus, you may find a good friend in them.</p>\n<p><strong><em>Note:-</em></strong> Always Maintain your boundaries.</p>\n<h3 id=\"say-more-yes-but-learn-to-say-no-too\" style=\"position:relative;\"><a href=\"#say-more-yes-but-learn-to-say-no-too\" aria-label=\"say more yes but learn to say no too permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Say More YES But Learn to say NO too</strong></h3>\n<p>Say Yes to challenges as it will burst your bubble. You will be able to appreciate your life at a new level. You will have new experiences and that’s the best gift your life can offer to you. But it is also okay to say no when it seems right to you. You should have a good work-life balance.</p>\n<h3 id=\"find-your-unique-way-to-do-your-work\" style=\"position:relative;\"><a href=\"#find-your-unique-way-to-do-your-work\" aria-label=\"find your unique way to do your work permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Find Your Unique Way to Do your Work</strong></h3>\n<blockquote>\n<p><em>Winners don't do different things, they do the things differently</em>.</p>\n</blockquote>\n<p>Highlight yourself with your ability to perform tasks in a unique way. It is very much urgent to be unique in competitive era. Therefore, come up with new ideas and support ideas which you believe in. It is very much necessary at workplace to listen your hearts. Dance to your heart’s tune and you will find a unique way to do your work.</p>\n<h3 id=\"break-up-with-complacency\" style=\"position:relative;\"><a href=\"#break-up-with-complacency\" aria-label=\"break up with complacency permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Break up with Complacency</strong></h3>\n<p>When you were a child, you never wanted to be a suit, a paper pusher or a dream killer. You wanted to a make difference to the world. You wanted to be a huge splash in the water. So, why are you not making it? It is time that you give up complacency and stop squandering your lives in doing mediocre things. Start from your job. Leave your comfort zone, take more challenges and push yourself to the next level. Because when you start loving your comfort zone, you cease to achieve. So, give up complacency and let the enlightenment dissipate.</p>\n<h3 id=\"dont-work-for-money\" style=\"position:relative;\"><a href=\"#dont-work-for-money\" aria-label=\"dont work for money permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Don’t Work For Money</strong></h3>\n<p>Money should be an inspiring aspect to your work but it should the prime one. There are truly some things in life which money can’t buy. There are many people who earn great paychecks but are not satisfied with their lives. You don’t want to be like them, right? So, find your passion in your work and all other things including money will come in the course of time.</p>\n<h3 id=\"forget-fear\" style=\"position:relative;\"><a href=\"#forget-fear\" aria-label=\"forget fear permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Forget Fear</strong></h3>\n<p>Do not fear of failing at workplace. All great men failed many times in their lives. So, see failing as learning and move ahead.</p>\n<h3 id=\"ditch-unwanted-relationships\" style=\"position:relative;\"><a href=\"#ditch-unwanted-relationships\" aria-label=\"ditch unwanted relationships permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Ditch Unwanted Relationships</strong></h3>\n<p>Choose your company wisely. You are the product of people with whom you spend most of the time with. Your company will reflect on your work and lives.</p>\n<h3 id=\"keep-the-bigger-picture-in-mind-about-your-organization\" style=\"position:relative;\"><a href=\"#keep-the-bigger-picture-in-mind-about-your-organization\" aria-label=\"keep the bigger picture in mind about your organization permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Keep The Bigger Picture In Mind (about your organization)</strong></h3>\n<p>It is always advised to keep the bigger picture in mind. When you take a decision, think of the end-results. Is it going to last long? Moreover, believe that you are going to have a long relationship with your organization and act accordingly.</p>\n<p>Your lives are definite. So, change your habits at the earliest and perform at your workplace to the fullest. Also, it is advised to build one habit at a time or you might get repulsed to adopt several changes so soon.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"April 07, 2017","updated_date":null,"description":"Tired of Being Mediocre At Work? These 10 Awesome Habits can take you out of your Comfort Zone and help you Live the life you want.","title":"Fight Mediocrity at Your Workplace, Dare to be Awesome!","tags":null,"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.3888888888888888,"src":"/static/440114de42fba0be8ddaa8311d3f293f/58556/Fight-mediocrity-at-your-workplace-dare-to-be-awesome.webp","srcSet":"/static/440114de42fba0be8ddaa8311d3f293f/61e93/Fight-mediocrity-at-your-workplace-dare-to-be-awesome.webp 200w,\n/static/440114de42fba0be8ddaa8311d3f293f/1f5c5/Fight-mediocrity-at-your-workplace-dare-to-be-awesome.webp 400w,\n/static/440114de42fba0be8ddaa8311d3f293f/58556/Fight-mediocrity-at-your-workplace-dare-to-be-awesome.webp 800w,\n/static/440114de42fba0be8ddaa8311d3f293f/210c1/Fight-mediocrity-at-your-workplace-dare-to-be-awesome.webp 900w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}},{"node":{"excerpt":"To be honest, I literally hated Google Keep when it came as default with my Nexus 5 Phone.  I was using Evernote back then. But gradually I…","fields":{"slug":"/growth/google-keep-tips-for-productivity/"},"html":"<p>To be honest, I literally hated Google Keep when it came as default with my Nexus 5 Phone.  I was using Evernote back then. But gradually I have developed interest towards Keep due to its lightweight and non lagging interface.</p>\n<p>So, the much Awaited Google Keep Feature is now on the floor - Keep is now integrated with G Suite. Read more about it and a few other tips on Keep below.</p>\n<h3 id=\"1-you-can-now-add-your-google-keep-notes-in-doc-right-from-docs-menu\" style=\"position:relative;\"><a href=\"#1-you-can-now-add-your-google-keep-notes-in-doc-right-from-docs-menu\" aria-label=\"1 you can now add your google keep notes in doc right from docs menu permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>1. You can now add your Google Keep notes in doc right from Docs menu.</strong></h3>\n<p>Some of the blogs have reported that it is available for G suite only but I can see that the update is rolled on regular Google accounts too.</p>\n<p><img src=\"/a50252902d5fe339f26f1f01a723ccc8/DocsWithKeep-blog.gif\" alt=\"Docs With Keep\"></p>\n<p><a href=\"https://gsuiteupdates.googleblog.com/2017/02/google-keep-now-g-suite-core-service.html\">[Source]</a></p>\n<p>The Above GIF by Google’s Official G Suite blog shows how you can easily fetch notes from keep to docs. You can not only fetch the notes from keep to docs but you can save the content from Google Docs to keep too. Just Select any Text, right click and choose “Save to Keep notepad”</p>\n<p><em>Many of the keep users don’t know but there was a “copy to google doc” feature already available for desktop users. (keep.google.com)</em></p>\n<h3 id=\"2-add-reminders-in-google-keep\" style=\"position:relative;\"><a href=\"#2-add-reminders-in-google-keep\" aria-label=\"2 add reminders in google keep permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>2. Add reminders in Google Keep</strong></h3>\n<p><img src=\"/e9a1f87d4843cc25ac0adbace59a05e3/remind-.gif\" alt=\"slack reminder\"></p>\n<p>You can setup reminders in keep. You can also set it up for daily chores like feeding your pet or buying groceries.</p>\n<p>P.S. if on phone you can also set up place based reminders. For example, you can remind yourself to workout when you reach home.</p>\n<h3 id=\"3-segregate-notes-using-labels\" style=\"position:relative;\"><a href=\"#3-segregate-notes-using-labels\" aria-label=\"3 segregate notes using labels permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>3. Segregate notes using Labels</strong></h3>\n<p><img src=\"/c024be09ba1a8caf25d1318f57504ed0/create-a-label.gif\" alt=\"create a label\"></p>\n<p>Using Keep for multiple things like homework or some event? Create Labels and add a label to each of the notes for easy organization. No more messed up notes, yay!</p>\n<h3 id=\"4-add-keep-widget-in-your-phone\" style=\"position:relative;\"><a href=\"#4-add-keep-widget-in-your-phone\" aria-label=\"4 add keep widget in your phone permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>4. Add Keep widget in your phone.</strong></h3>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 177.84615384615387%; position: relative; bottom: 0; left: 0; background-image: url('data:image/webp;base64,UklGRiIBAABXRUJQVlA4IBYBAADwBQCdASoUACQAPtFcpU4oJSMiKqgBABoJZgDCgYyAlElrY7LPTJtfI4YDMEXOyWn3AsUhIpZ1IAD+wH/QdYwXSc3C5PftyiT8sY0xmA5tXG1dBd9yh4S5u4CE7E7vxcCAEFKUKCbXezW/RABgyZ5UK/i+JEKlY9ix9DkZ09ujgz5RnFIXW0z5vTGXVmG4Or4IIkyM6aQ6XM3PpwSHxwW/ZMCg47qsCKPL50/OCxqdpEHifH+t+oJRbDMWN79P0YTlPADbnPi4zN1xDfJMEJ1DHI6xL2nf3mhLC9HFLthQp9KGTc5KxT8qaXgQ575Lbkh7Un4TnhduAFLMddQN+WPtPS4KctKE+GaP+PWIegVred4uXKyAAA=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Keep Widget Android\"\n        title=\"Keep Widget Android\"\n        src=\"/static/495584922e3874aa5a045e426a48411b/8b983/Keep-Widget-Android.webp\"\n        srcset=\"/static/495584922e3874aa5a045e426a48411b/c1dc5/Keep-Widget-Android.webp 650w,\n/static/495584922e3874aa5a045e426a48411b/8b983/Keep-Widget-Android.webp 768w,\n/static/495584922e3874aa5a045e426a48411b/260c2/Keep-Widget-Android.webp 1080w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Add your desired keep note to the home screen of your Android using the Keep widget. You can choose which note you want to display. Using the widget you can also add a note or an image and view the existing notes. For me, the Keep widget is a great way to remind myself about the important tasks I have.</p>\n<h3 id=\"5-visual-notes-add-images-to-keep\" style=\"position:relative;\"><a href=\"#5-visual-notes-add-images-to-keep\" aria-label=\"5 visual notes add images to keep permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>5. Visual notes, add images to Keep!</strong></h3>\n<p><img src=\"/b9731c2b89e2f3bbcbbae2e2c898c52b/add-visual-and-image.gif\" alt=\"add visual and image in keep\"></p>\n<p>Saw an awesome DIY bottle and want to make it too? Just save it to Keep by opening your camera right from the Keep dashboard and save the image as note or reminder!</p>\n<h3 id=\"6-voice-notes\" style=\"position:relative;\"><a href=\"#6-voice-notes\" aria-label=\"6 voice notes permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>6. Voice Notes</strong></h3>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 177.84615384615387%; position: relative; bottom: 0; left: 0; background-image: url('data:image/webp;base64,UklGRsIAAABXRUJQVlA4ILYAAAAQBgCdASoUACQAPtFWpEyoJKOiKrgN+QAaCUAWHYF9b0G2Fp6ZqqvKeO463zxJoVST69gWydcYtwAA/rtKY3ARDBp+EA03aWzfJIoWZogWwZf75gbS9SWBDl6oaDHUd7GFNWrc8iNRxGv2M5j9kFHhQfYOGWeb9hIzRjXibOUPkaafpYW0qxn3LFPd83iHiIia50HZ5Vst5sXKHUeTrg3wtHH6k/ogsmIMBXOLKapi6mO2vUAAAA=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Keep Voice Note\"\n        title=\"Keep Voice Note\"\n        src=\"/static/fb567bbceeaae1910906fbf9c6e6e50f/8b983/Keep-Voice-Note.webp\"\n        srcset=\"/static/fb567bbceeaae1910906fbf9c6e6e50f/c1dc5/Keep-Voice-Note.webp 650w,\n/static/fb567bbceeaae1910906fbf9c6e6e50f/8b983/Keep-Voice-Note.webp 768w,\n/static/fb567bbceeaae1910906fbf9c6e6e50f/260c2/Keep-Voice-Note.webp 1080w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>You can also add voice notes if you don’t want to type the notes!</p>\n<p>Pro tip: Don’t have microphone in your laptop or PC? Or facing issue with recording on laptop, Just record using keep, open keep in desktop and download the file.</p>\n<h3 id=\"7-save-a-tab-try-the-google-keep-extension\" style=\"position:relative;\"><a href=\"#7-save-a-tab-try-the-google-keep-extension\" aria-label=\"7 save a tab try the google keep extension permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>7. Save a Tab, Try the Google Keep extension!</strong></h3>\n<p><img src=\"/f4c73889c0f038f26fb7c1500c2efebf/video.gif\" alt=\"slack extension\"></p>\n<p>Google Keep Chrome Extension is a bliss especially when you are a frequent keep user. It also saves you a tab.</p>\n<h3 id=\"8-share-keep-with-your-friends-family-and-colleagues-and-let-them-edit-it-too\" style=\"position:relative;\"><a href=\"#8-share-keep-with-your-friends-family-and-colleagues-and-let-them-edit-it-too\" aria-label=\"8 share keep with your friends family and colleagues and let them edit it too permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>8. Share keep with your friends, family, and colleagues and let them edit it too.</strong></h3>\n<p><img src=\"/835658e04c278cd7721315b2850affd9/share.gif\" alt=\"share files in keep\"></p>\n<p>Just like Google Docs, you can also share your keep notes with your team and friends.</p>\n<h3 id=\"9-make-a-checklist\" style=\"position:relative;\"><a href=\"#9-make-a-checklist\" aria-label=\"9 make a checklist permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>9. Make a checklist!</strong></h3>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 177.84615384615387%; position: relative; bottom: 0; left: 0; background-image: url('data:image/webp;base64,UklGRrIAAABXRUJQVlA4IKYAAABwBQCdASoUACQAPtFWo00oJKMiKrgN+QAaCWkAAB9Q9BahmupWDXV8/dQY+X3T/XqveLuAAP7wGx5YM+k2536qpeK1HqDQFqqzyjUH+MK0dGQ4v8zP06BtSKl4odGM+7P639wCMT8cJAHBh8A0y0n6Pnn9df0kXCdceUGB6/dR/OsKCt1f7wbERfyLf6oyue4ze0U4LYmaHPWgmZnw9kILLelIAAAA'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Keep Notes in Checklist\"\n        title=\"Keep Notes in Checklist\"\n        src=\"/static/e2f464b955e2df615d5eaf8e821e2e12/8b983/Keep-Notes-in-Checklist.webp\"\n        srcset=\"/static/e2f464b955e2df615d5eaf8e821e2e12/c1dc5/Keep-Notes-in-Checklist.webp 650w,\n/static/e2f464b955e2df615d5eaf8e821e2e12/8b983/Keep-Notes-in-Checklist.webp 768w,\n/static/e2f464b955e2df615d5eaf8e821e2e12/260c2/Keep-Notes-in-Checklist.webp 1080w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Add checkpoints to your tasks and mark them check when you are done. The checked points move down to the list.. [Though you can change that in settings]</p>\n<h3 id=\"10-add-a-pinned-note\" style=\"position:relative;\"><a href=\"#10-add-a-pinned-note\" aria-label=\"10 add a pinned note permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>10. Add a pinned note</strong></h3>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 177.84615384615387%; position: relative; bottom: 0; left: 0; background-image: url('data:image/webp;base64,UklGRroAAABXRUJQVlA4IK4AAACwBQCdASoUACQAPtFWpE6oJCMiKrgMAQAaCWkAAB9svOckW3XA5rkF/SnR0Zz+o+owIwNnkMAA/vAbHrNV5CVgiMgdGsc1xBKXkNNnpcZLkTzuEF7mdcDml8Or427eHl4wTUZvvdAF3HWxD91x/C7HQJVW24mXMCdmsqf0HN2LS3lbpgZJ5HSpWyBBf5nexUUKXvfRX2bX8xYcuJl85xMmvALjY48aaV0a0mjwAAA='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Keep Pinned Note\"\n        title=\"Keep Pinned Note\"\n        src=\"/static/eeeaa5917975b5547ecb7565b1eec136/8b983/Keep-Pinned-Note.webp\"\n        srcset=\"/static/eeeaa5917975b5547ecb7565b1eec136/c1dc5/Keep-Pinned-Note.webp 650w,\n/static/eeeaa5917975b5547ecb7565b1eec136/8b983/Keep-Pinned-Note.webp 768w,\n/static/eeeaa5917975b5547ecb7565b1eec136/260c2/Keep-Pinned-Note.webp 1080w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Want to keep a note always at top? Pin it.</p>\n<h3 id=\"11-keyboard-shortcuts\" style=\"position:relative;\"><a href=\"#11-keyboard-shortcuts\" aria-label=\"11 keyboard shortcuts permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>11. Keyboard Shortcuts</strong></h3>\n<p>Here are a few shortcuts which can be really helpful.</p>\n<p>c: Create a new note</p>\n<p>/: To search from the list of notes</p>\n<p>ESC: Close Note after editing</p>\n<p>J and K: Move to next or previous note</p>\n<p>N and p: To Move to next or previous list item in the note</p>\n<p>?: For opening the complete list of keyboard shortcuts TL;DR watch this video if you are in short of time!</p>\n<p>Happy Notes.</p>\n<script src=\"https://www.youtube.com/iframe_api\"></script>\n<script type=\"text/javascript\">var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { videoId: 'UbvkHEDvw-o', playerVars: { controls: 0, autoplay: 0, disablekb: 1, enablejsapi: 1, iv_load_policy: 3, modestbranding: 1, showinfo: 0, rel: 0 } }); }</script>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"March 06, 2017","updated_date":null,"description":"With the recent update by Google to integrate Keep with G Suite, Keep has become our all time bestie. Google Keep Tips you always wanted to know for better productivity.","title":"How To Insert Keep Notes in Doc Plus other Keep Tips For Better Productivity","tags":null,"pinned":null,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.4388489208633093,"src":"/static/9b38cdd91771a5964ee8a300af2a5b26/58556/How-To-Insert-Keep-notes-in-Doc-Plus-other-Keep-tips-For-Better-Productivity.webp","srcSet":"/static/9b38cdd91771a5964ee8a300af2a5b26/61e93/How-To-Insert-Keep-notes-in-Doc-Plus-other-Keep-tips-For-Better-Productivity.webp 200w,\n/static/9b38cdd91771a5964ee8a300af2a5b26/1f5c5/How-To-Insert-Keep-notes-in-Doc-Plus-other-Keep-tips-For-Better-Productivity.webp 400w,\n/static/9b38cdd91771a5964ee8a300af2a5b26/58556/How-To-Insert-Keep-notes-in-Doc-Plus-other-Keep-tips-For-Better-Productivity.webp 800w,\n/static/9b38cdd91771a5964ee8a300af2a5b26/99238/How-To-Insert-Keep-notes-in-Doc-Plus-other-Keep-tips-For-Better-Productivity.webp 1200w,\n/static/9b38cdd91771a5964ee8a300af2a5b26/7c22d/How-To-Insert-Keep-notes-in-Doc-Plus-other-Keep-tips-For-Better-Productivity.webp 1600w,\n/static/9b38cdd91771a5964ee8a300af2a5b26/da70b/How-To-Insert-Keep-notes-in-Doc-Plus-other-Keep-tips-For-Better-Productivity.webp 4500w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}}]},"markdownRemark":{"excerpt":"Identity is evolving, and developers are at the forefront of this transformation. Every day brings a new learning—adapting to new standards…","fields":{"slug":"/identity/developer-first-identity-provider-loginradius/"},"html":"<p>Identity is evolving, and developers are at the forefront of this transformation. Every day brings a new learning—adapting to new standards and refining approaches to building secure, seamless experiences.</p>\n<p>We’re here to support developers on that journey. We know how important simplicity, efficiency, and well-structured documentation are when working with identity and access management solutions. That’s why we’ve redesigned the <a href=\"https://www.loginradius.com/\">LoginRadius website</a>—to be faster, more intuitive, and developer-first in every way.</p>\n<p>The goal? Having them spend less time searching and more time building.</p>\n<h2 id=\"whats-new-and-improved-on-the-loginradius-website\" style=\"position:relative;\"><a href=\"#whats-new-and-improved-on-the-loginradius-website\" aria-label=\"whats new and improved on the loginradius website permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>What’s New and Improved on the LoginRadius Website?</h2>\n<p>LoginRadius’ vision is to give developers a product that simplifies identity management so they can focus on building, deploying, and scaling their applications. To enhance this experience, we’ve spent the last few months redesigning our interface— making navigation more intuitive and reassuring that essential resources are easily accessible.</p>\n<p>Here’s a closer look at what’s new and why it’s important:</p>\n<h3 id=\"a-developer-friendly-dark-theme\" style=\"position:relative;\"><a href=\"#a-developer-friendly-dark-theme\" aria-label=\"a developer friendly dark theme permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>A Developer-Friendly Dark Theme</h3>\n<p><img src=\"/f46881583c7518a93bb24e94c32320de/a-developer-friendly-dark-theme.webp\" alt=\"This image shows how LoginRadius offers several authentication methods like traditional login, social login, passwordless login, passkeys and more in a dark mode.\">    </p>\n<p>Developers spend long hours working in dark-themed IDEs and terminals, so we’ve designed the LoginRadius experience to be developer-friendly and align with that preference.</p>\n<p>The new dark mode reduces eye strain, enhances readability, and provides a seamless transition between a coding environment and our platform. Our new design features a clean, modern aesthetic with a consistent color scheme and Barlow typography, ensuring better readability. High-quality graphics and icons are thoughtfully placed to enhance the content without adding visual clutter.</p>\n<p>So, whether you’re navigating our API docs or configuring authentication into your system, our improved interface will make those extended development hours more comfortable and efficient.</p>\n<h3 id=\"clear-categorization-for-loginradius-capabilities\" style=\"position:relative;\"><a href=\"#clear-categorization-for-loginradius-capabilities\" aria-label=\"clear categorization for loginradius capabilities permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Clear Categorization for LoginRadius Capabilities</h3>\n<p><img src=\"/e5358b82be414940f3fb146013845933/capabilities.webp\" alt=\"This image shows a breakdown of all the LoginRadius CIAM capabilities, including authentication, security, UX, scalability and multi-brand management.\"></p>\n<p>We’ve restructured our website to provide a straightforward breakdown of our customer identity and access management platform capabilities, helping you quickly find what you need:</p>\n<ul>\n<li>Authentication: Easily understand <a href=\"https://www.loginradius.com/blog/identity/authentication-option-for-your-product/\">how to choose the right login method</a>, from traditional passwords and OTPs to social login, federated SSO, and passkeys with few lines of code.</li>\n<li>Security: Implement no-code security features like bot detection, IP throttling, breached password alerts, DDoS protection, and adaptive MFA to safeguard user accounts.</li>\n<li>User Experience: Leverage AI builder, hosted pages, and drag-and-drop workflows to create smooth, branded sign-up and login experiences.</li>\n<li>High Performance &#x26; Scalability: Confidently scale with sub-100ms API response times, 100% uptime, 240K+ RPS, and 28+ global data center regions.</li>\n<li>Multi-Brand Management: Efficiently manage multiple identity apps, choosing isolated or shared data stores based on your brand’s unique needs.</li>\n</ul>\n<p>This structured layout ensures you can quickly understand each capability and how it integrates into your identity ecosystem.</p>\n<h3 id=\"developer-first-navigation\" style=\"position:relative;\"><a href=\"#developer-first-navigation\" aria-label=\"developer first navigation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Developer-First Navigation</h3>\n<p><img src=\"/a8c155c2b6faf3d5f4b4de4e2b14d763/developers-menu.webp\" alt=\"This image shows the LoginRadius menu bar, highlighting the developer dropdown.\">   </p>\n<p>We’ve been analyzing developer workflows to identify how you access key resources. That’s why we redesigned our navigation with one goal in mind: to reduce clicks and make essential resources readily available.</p>\n<p>The new LoginRadius structure puts APIs, SDKs, and integration guides right at the menu bar under the Developers dropdown so you can get started faster. Our Products, Solutions, and Customer Services are also clearly categorized, helping development teams quickly find the right tools and make informed decisions.</p>\n<h3 id=\"quick-understanding-of-integration-benefits\" style=\"position:relative;\"><a href=\"#quick-understanding-of-integration-benefits\" aria-label=\"quick understanding of integration benefits permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Quick Understanding of Integration Benefits</h3>\n<p><img src=\"/b2f9a964a2da0ea83e2f8596b833bba7/we-support-your-tech-stack.webp\" alt=\"This image shows a list of popular programming languages and frameworks offered by LoginRadius.\"></p>\n<p>Developers now have a clear view of the tech stack available with LoginRadius, designed to support diverse business needs.</p>\n<p>Our platform offers pre-built SDKs for Node.js, Python, Java, and more, making CIAM integration seamless across popular programming languages and frameworks.</p>\n<h2 id=\"over-to-you-now\" style=\"position:relative;\"><a href=\"#over-to-you-now\" aria-label=\"over to you now permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Over to You Now!</h2>\n<p>Check out our <a href=\"https://www.loginradius.com/\">revamped LoginRadius website</a> and see how the improved experience makes it easier to build, scale, and secure your applications.</p>\n<p>Do not forget to explore the improved navigation and API documentation, and get started with our free trial today. We’re excited to see what you’ll build with LoginRadius!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"February 21, 2025","updated_date":null,"description":"LoginRadius’ vision is to give developers a product that simplifies identity management so they can focus on building, deploying, and scaling their applications. To enhance this experience, we’ve redesigned our website interface, making navigation more intuitive and reassuring that essential resources are easily accessible.","title":"Revamped & Ready: Introducing the New Developer-First LoginRadius Website","tags":["Developer tools","API","Identity Management","User Authentication"],"pinned":true,"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.7857142857142858,"src":"/static/80b4e4fbe176a10a327d273504607f32/58556/hero-section.webp","srcSet":"/static/80b4e4fbe176a10a327d273504607f32/61e93/hero-section.webp 200w,\n/static/80b4e4fbe176a10a327d273504607f32/1f5c5/hero-section.webp 400w,\n/static/80b4e4fbe176a10a327d273504607f32/58556/hero-section.webp 800w,\n/static/80b4e4fbe176a10a327d273504607f32/99238/hero-section.webp 1200w,\n/static/80b4e4fbe176a10a327d273504607f32/7c22d/hero-section.webp 1600w,\n/static/80b4e4fbe176a10a327d273504607f32/1258b/hero-section.webp 2732w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Rakesh Soni","github":"oyesoni","avatar":"rakesh-soni.webp"}}}},"pageContext":{"limit":6,"skip":906,"currentPage":152,"type":"///","numPages":164,"pinned":"ee8a4479-3471-53b1-bf62-d0d8dc3faaeb"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}