Dubai Directories
  • Home
  • News
    • All
    • Business
    • Fashion
    • health
    • Law
    • Tech
    How to file a criminal case in Dubai

    How to file a criminal case in Dubai?

    Why Is Digital Marketing The Most Effective Channel For Business Growth?

    Why Is Digital Marketing The Most Effective Channel For Business Growth?

    list of food distribution companies in dubai

    List of food distribution companies in Dubai

    oman insurance hospital list

    Oman Insurance Hospital List in Dubai

    Oman Direct Billing Outpatient Claim Form

    Oman Direct Billing Outpatient Claim Form

    Different Types of Contact Lenses

    Different Types of Contact Lenses, A Complete Guide

    Trending Tags

    • SEO
      • All
      • SEO Updates
      Top 70+ Dubai Business Directories & Local Listings - Updated (2020)

      Top 70+ Dubai Business Directories & Local Listings – Updated (2020)

      50+ High DA Social Bookmarking sites list 2020

      High DA image sharing website – Updated (2020)

      Get the list of all Browser cookies using JavaScript

      How to Get the list of all Browser cookies using JavaScript

      High Da social bookmarking Websites lists - Updated (2020)

      High DA social bookmarking Websites lists – Updated (2020)

      Trending Tags

      • Top Business
      • Submit Your Article
      Submit Your Website
      • Home
      • News
        • All
        • Business
        • Fashion
        • health
        • Law
        • Tech
        How to file a criminal case in Dubai

        How to file a criminal case in Dubai?

        Why Is Digital Marketing The Most Effective Channel For Business Growth?

        Why Is Digital Marketing The Most Effective Channel For Business Growth?

        list of food distribution companies in dubai

        List of food distribution companies in Dubai

        oman insurance hospital list

        Oman Insurance Hospital List in Dubai

        Oman Direct Billing Outpatient Claim Form

        Oman Direct Billing Outpatient Claim Form

        Different Types of Contact Lenses

        Different Types of Contact Lenses, A Complete Guide

        Trending Tags

        • SEO
          • All
          • SEO Updates
          Top 70+ Dubai Business Directories & Local Listings - Updated (2020)

          Top 70+ Dubai Business Directories & Local Listings – Updated (2020)

          50+ High DA Social Bookmarking sites list 2020

          High DA image sharing website – Updated (2020)

          Get the list of all Browser cookies using JavaScript

          How to Get the list of all Browser cookies using JavaScript

          High Da social bookmarking Websites lists - Updated (2020)

          High DA social bookmarking Websites lists – Updated (2020)

          Trending Tags

          • Top Business
          • Submit Your Article
          No Result
          View All Result
          Dubai Directories
          No Result
          View All Result
          Home SEO SEO Updates

          How to Get the list of all Browser cookies using JavaScript

          daisy by daisy
          September 4, 2020
          in SEO Updates
          0
          Get the list of all Browser cookies using JavaScript
          0
          SHARES
          40
          VIEWS
          Share on FacebookShare on Twitter

          Get list of all Browser cookies using JavaScript

          ADVERTISEMENT

          Cookies are mainly data’s that are stored in the computer for browser accessing. For making the work easy you can make all these cookies in a single page using JavaScript. We are mainly using these Http cookies to store data on our visitor’s browser. Directory path or page path have important role in setting these cookies, try to use the “path” parameter for setting cookies.  Please have a look at the code below, this code will help you to set all cookies to a single page.

          The below code explains about adding the cookie name as the index & for the cookie value as the value itself:

          function get_cookies_array() {
              var cookies = { };
              if (document.cookie && document.cookie != '') {
                  var split = document.cookie.split(';');
                  for (var i = 0; i < split.length; i++) {
                      var name_value = split[i].split("=");
                      name_value[0] = name_value[0].replace(/^ /, '');
                      cookies[decodeURIComponent(name_value[0])] = decodeURIComponent(name_value[1]);
                  }
              }
              return cookies;
          }
          var cookies = get_cookies_array();
          for(var name in cookies) {
           console.log( name + " : " + cookies[name] + "
          " );
          }

          It is over, what you have do now is simply copy & past this line of codes in console & run

          Some of the major things that we are used in JavaScript with cookies are listed below.

          adminadminalthaf

          How to set Cookie in JavaScript

          Create JavaScript cookies with the help of document is listed below

          document.cookie = “cookiename=cookievalue”

          For some cookies we will use expiry dates, if you want to add expiry date for any particular cookies please have a look at the below example. There is no need to worry cookies will be automatically remove from the browser when the browser is closed. Expiry date can be added as below.

          document.cookie = “cookiename=cookievalue; expires= Thu, 23 June 2019 23:15:00 UTC”

          How to get Cookie in JavaScript

          Domain names are saved by the cookies that we set & we can get its access by setting the cookie code.

          var x =  document.cookie

          How to Delete Cookie in JavaScript

          For deleting a cookie in java script, set the cookie value to empty and set the value of expires to a passed date.

          document.cookie = “cookiename= ; expires = wed, 06 Mar 1980 00:00:00 GMT”

          Tags: Browser cookies using JavaScriptGet list of all Browser cookies using JavaScriptGet the list of all Browser cookiesHow to get Cookie in JavaScriptHow to set Cookie in JavaScript
          Previous Post

          High DA social bookmarking Websites lists – Updated (2020)

          Next Post

          High DA image sharing website – Updated (2020)

          daisy

          daisy

          Daisy is living in Dubai for the past few years & working in the field of journalism. The blogs are published on the website only after detailed research under each industry & business.

          Next Post
          50+ High DA Social Bookmarking sites list 2020

          High DA image sharing website – Updated (2020)

          Leave a Reply Cancel reply

          Your email address will not be published. Required fields are marked *

          Stay Connected

          • 45 Fans

          Recommended

          Why Is Digital Marketing The Most Effective Channel For Business Growth?

          Why Is Digital Marketing The Most Effective Channel For Business Growth?

          December 12, 2020
          top mobile app development companies in Dubai

          Top 5 Mobile App Development Companies in Dubai -2020 [Updated List]

          September 12, 2020

          Most Popular

          How to file a criminal case in Dubai
          Dubai

          How to file a criminal case in Dubai?

          January 10, 2021
          list of food distribution companies in dubai
          Business

          List of food distribution companies in Dubai

          January 10, 2021
          oman insurance hospital list
          Dubai

          Oman Insurance Hospital List in Dubai

          October 30, 2020
          Dubai Directories

          Dubai-directories.com is an one-stop solution for all types of news & information's about Businesses in Dubai.

          Follow Us

          Browse by Category

          • Business
          • Dubai
          • Fashion
          • health
          • Law
          • SEO Updates
          • Tech
          • Top Business

          Recent News

          How to file a criminal case in Dubai

          How to file a criminal case in Dubai?

          January 10, 2021
          Why Is Digital Marketing The Most Effective Channel For Business Growth?

          Why Is Digital Marketing The Most Effective Channel For Business Growth?

          December 12, 2020
          • About
          • Terms and Conditions
          • Privacy Policy
          • Contact
          • Submit Article

          © 2020 Dubai Directories

          No Result
          View All Result
          • Home
          • News
          • SEO
          • Top Business
          • Submit Your Article

          © 2020 Dubai Directories