{"id":1150,"date":"2019-06-06T11:53:18","date_gmt":"2019-06-06T04:53:18","guid":{"rendered":"https:\/\/www.yellowweb.id\/blog\/?p=1150"},"modified":"2019-06-06T11:53:18","modified_gmt":"2019-06-06T04:53:18","slug":"ajax","status":"publish","type":"post","link":"https:\/\/www.yellowweb.id\/blog\/ajax\/","title":{"rendered":"AJAX"},"content":{"rendered":"<p>AJAX kependekan dari Asynchronous JavaScript and XML, yang berfungsi untuk mengambil serta mengirim data dari klien ke server secara background, dengan melakukan perubahan (update) halaman tanpa secara menyeluruh melainkan perbagian.<br \/>\n<!--more--><\/p>\n<p>AJAX bukan merupakan bahasa pemrograman, melainkan masih didalam satu grup seperti DOM, XML dan yang lainnya. Implementasi AJAX terdapat hampir disetiap web modern seperti: Facebook,  Twitter, Google Mail dan masih banyak lagi.<br \/>\nAda beberapa hal yang perlu diketahui terkait dengan AJAX, tentunya yang paling mendasar adalah objek XMLHttpRequest, yang memiliki methods serta  properties.<br \/>\n<a href=\"https:\/\/www.w3schools.com\/xml\/ajax_xmlhttprequest_create.asp\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/www.w3schools.com\/xml\/ajax_xmlhttprequest_create.asp<\/a><\/p>\n<p>Untuk tools yang digunakan jika ingin mengetahui prinsip kerja AJAX dapat menggunakan tools built-in web developer dari browser (console &#038; XHR).<\/p>\n<p>Synchronous dan Asynchronous<br \/>\nPada saat permintaan dibuat, hasilnya akan didapatkan oleh klien ketika permintaan tersebut telah sampai diserver kemudian dikembalikan lagi. Hal ini membuat operasi sedikit berjalan lebih lama karena browser harus menunggu. Sedangkan dengan menggunakan AJAX permintaan didapatkan secara bertahap tanpa harus menunggu operasi secara menyeluruh.<br \/>\n<div id=\"attachment_1153\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/asynchronous.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1153\" src=\"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/asynchronous-300x174.jpg\" alt=\"asynchronous.jpg\" width=\"300\" height=\"174\" class=\"size-medium wp-image-1153\" srcset=\"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/asynchronous-300x174.jpg 300w, https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/asynchronous.jpg 490w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-1153\" class=\"wp-caption-text\">asynchronous<\/p><\/div><\/p>\n<p>Untuk hasil yang akan ditampilkan disini murni hanya menggunakan AJAX tanpa jQuery.<br \/>\n<a href=\"https:\/\/www.yellowweb.id\/demo\/ajaxku\/\" rel=\"noopener noreferrer\" target=\"_blank\">DEMO<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AJAX kependekan dari Asynchronous JavaScript and XML, yang berfungsi untuk mengambil serta mengirim data dari klien ke server secara background, dengan melakukan perubahan (update) halaman tanpa secara menyeluruh melainkan perbagian.<\/p>\n","protected":false},"author":1,"featured_media":1151,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[265],"tags":[266,18,191,88],"class_list":["post-1150","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ajax","tag-ajax","tag-jquery","tag-mysql","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AJAX - YELLOWWEB.ID<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.yellowweb.id\/blog\/ajax\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AJAX - YELLOWWEB.ID\" \/>\n<meta property=\"og:description\" content=\"AJAX kependekan dari Asynchronous JavaScript and XML, yang berfungsi untuk mengambil serta mengirim data dari klien ke server secara background, dengan melakukan perubahan (update) halaman tanpa secara menyeluruh melainkan perbagian.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.yellowweb.id\/blog\/ajax\/\" \/>\n<meta property=\"og:site_name\" content=\"YELLOWWEB.ID\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-06T04:53:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/ajax.jpg?fit=600%2C290&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"290\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"yellowweb\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yellowweb\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/\"},\"author\":{\"name\":\"yellowweb\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#\\\/schema\\\/person\\\/75188044e080844724e381ab6a5b9829\"},\"headline\":\"AJAX\",\"datePublished\":\"2019-06-06T04:53:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/\"},\"wordCount\":182,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ajax.jpg\",\"keywords\":[\"ajax\",\"jquery\",\"mysql\",\"php\"],\"articleSection\":[\"ajax\"],\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/\",\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/\",\"name\":\"AJAX - YELLOWWEB.ID\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ajax.jpg\",\"datePublished\":\"2019-06-06T04:53:18+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#\\\/schema\\\/person\\\/75188044e080844724e381ab6a5b9829\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ajax.jpg\",\"contentUrl\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/06\\\/ajax.jpg\",\"width\":600,\"height\":290,\"caption\":\"prinsip kerja ajax\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/ajax\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AJAX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/\",\"name\":\"YELLOWWEB.ID\",\"description\":\"Kursus Web Design | Kursus Web Programming | Mobile Web Apps | Digital Marketing\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/#\\\/schema\\\/person\\\/75188044e080844724e381ab6a5b9829\",\"name\":\"yellowweb\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g\",\"caption\":\"yellowweb\"},\"sameAs\":[\"https:\\\/\\\/www.yellowweb.id\"],\"url\":\"https:\\\/\\\/www.yellowweb.id\\\/blog\\\/author\\\/yellowweb\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AJAX - YELLOWWEB.ID","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.yellowweb.id\/blog\/ajax\/","og_locale":"en_GB","og_type":"article","og_title":"AJAX - YELLOWWEB.ID","og_description":"AJAX kependekan dari Asynchronous JavaScript and XML, yang berfungsi untuk mengambil serta mengirim data dari klien ke server secara background, dengan melakukan perubahan (update) halaman tanpa secara menyeluruh melainkan perbagian.","og_url":"https:\/\/www.yellowweb.id\/blog\/ajax\/","og_site_name":"YELLOWWEB.ID","article_published_time":"2019-06-06T04:53:18+00:00","og_image":[{"width":600,"height":290,"url":"https:\/\/i0.wp.com\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/ajax.jpg?fit=600%2C290&ssl=1","type":"image\/jpeg"}],"author":"yellowweb","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yellowweb","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/#article","isPartOf":{"@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/"},"author":{"name":"yellowweb","@id":"https:\/\/www.yellowweb.id\/blog\/#\/schema\/person\/75188044e080844724e381ab6a5b9829"},"headline":"AJAX","datePublished":"2019-06-06T04:53:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/"},"wordCount":182,"commentCount":0,"image":{"@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/#primaryimage"},"thumbnailUrl":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/ajax.jpg","keywords":["ajax","jquery","mysql","php"],"articleSection":["ajax"],"inLanguage":"en-GB","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.yellowweb.id\/blog\/ajax\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/","url":"https:\/\/www.yellowweb.id\/blog\/ajax\/","name":"AJAX - YELLOWWEB.ID","isPartOf":{"@id":"https:\/\/www.yellowweb.id\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/#primaryimage"},"image":{"@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/#primaryimage"},"thumbnailUrl":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/ajax.jpg","datePublished":"2019-06-06T04:53:18+00:00","author":{"@id":"https:\/\/www.yellowweb.id\/blog\/#\/schema\/person\/75188044e080844724e381ab6a5b9829"},"breadcrumb":{"@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.yellowweb.id\/blog\/ajax\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/#primaryimage","url":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/ajax.jpg","contentUrl":"https:\/\/www.yellowweb.id\/blog\/wp-content\/uploads\/2019\/06\/ajax.jpg","width":600,"height":290,"caption":"prinsip kerja ajax"},{"@type":"BreadcrumbList","@id":"https:\/\/www.yellowweb.id\/blog\/ajax\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.yellowweb.id\/blog\/"},{"@type":"ListItem","position":2,"name":"AJAX"}]},{"@type":"WebSite","@id":"https:\/\/www.yellowweb.id\/blog\/#website","url":"https:\/\/www.yellowweb.id\/blog\/","name":"YELLOWWEB.ID","description":"Kursus Web Design | Kursus Web Programming | Mobile Web Apps | Digital Marketing","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.yellowweb.id\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.yellowweb.id\/blog\/#\/schema\/person\/75188044e080844724e381ab6a5b9829","name":"yellowweb","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5afd1bfac26e9377e8f5e36afb624cf3690dd31cb07c3961dfbc736b9ff1912f?s=96&d=mm&r=g","caption":"yellowweb"},"sameAs":["https:\/\/www.yellowweb.id"],"url":"https:\/\/www.yellowweb.id\/blog\/author\/yellowweb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts\/1150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/comments?post=1150"}],"version-history":[{"count":3,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts\/1150\/revisions"}],"predecessor-version":[{"id":1155,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/posts\/1150\/revisions\/1155"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/media\/1151"}],"wp:attachment":[{"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/media?parent=1150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/categories?post=1150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yellowweb.id\/blog\/wp-json\/wp\/v2\/tags?post=1150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}