{"id":13023,"date":"2014-04-18T20:00:11","date_gmt":"2014-04-18T14:30:11","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=13023"},"modified":"2014-04-19T11:15:14","modified_gmt":"2014-04-19T05:45:14","slug":"apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/","title":{"rendered":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Before writing this blog, I would first like to make you familiar with one quote <strong><em>&#8220;Be liberal in what you accept, and conservative in what you send&#8221;<\/em><\/strong>. Yes that&#8217;s what HTTP robustness protocol states. <\/p>\n<p><strong>Scenario :<\/strong><br \/>\nWe have a use case where our server need to read XML files that are large containing 400 outer element with extremely nested elements from provider server.<\/p>\n<p><strong>Tasks Involved :<\/strong><\/p>\n<ol>\n<li>Our server will run good amount quartz scheduling job for fetching XML file of different scenario&#8217;s from a server and process them differently.<\/li>\n<li>Each job will run per minute to monitor the content, as real time content may change or not, which has to be displayed in real time to the end users.<\/li>\n<\/ol>\n<p><strong>Problem :<\/strong><br \/>\n<strong>Reading, validating and processing large XML<\/strong> every minute to make them available to end user<em><strong>&#8220;even if file content is unmodified&#8221;<\/strong><\/em>. It will make unnecessary overhead for our server and consumption of IO operation even when data is not modified.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-ttn-blog\/uploads\/2014\/04\/oct-cartoon1.jpg\" alt=\"Don&#039;t know what to show on board\" width=\"340\" height=\"268\" class=\"alignleft size-full\" \/><\/p>\n<p>It&#8217;s like our server not able to find relevant data and ending up reading same data every time <strong>polluting the server environment<\/strong> with processing of large responses.<\/p>\n<p><strong>How to clean our server environment, from large unnecessary processing? Solution : HTTP conditional policy request using mod_policy<\/strong><\/p>\n<p>Yes you can make conditional request <em><strong>&#8220;If-Modified-Since&#8221;<\/strong><\/em> to provider to determine whether the file is being modified or not.<\/p>\n<p><strong>Request Flow :<\/strong><\/p>\n<ol>\n<li>Our server will make request via adding conditional header, &#8220;If-Modified-Since&#8221;, Using ApacheHTTPClient 4.3\n<pre>\r\n      apacheHTTPClientAdapter.requestObject.setHeader(\"If-Modified-Since\",\"Fri, 17 Jan 2014 19:10:11 GMT\");\r\n      \/\/Note : I have used ApacheHttpClient 4.3 to make request\r\n<\/pre>\n<p>&nbsp;<br \/>&nbsp;\n<\/li>\n<li>Or Using HTTP URL Connection :\n<pre>\r\n     URL url = new URL({file});\r\n     HttpURLConnection http = (HttpURLConnection)url.openConnection();\r\n     Http. addRequestProperty (\"If-Modified-Since\", LastUpdate);\r\n     http.connect();\r\n<\/pre>\n<\/li>\n<li>Now, provider server mod_policy filter check for the GMT lastUpdated date you have specified in &#8220;If-Modified-Since&#8221; header value of request, so :\n<ul>\n<li>If the file last-modified is greater than lastUpdated than only provider server will pass original request via responding with 200 OK with the file content to our server.\n<\/li>\n<li> <em><strong>else if the file is not modified, <\/strong><\/em>provider server will respond with response code <strong>HTTP 1.1\/304 Not Modified<\/strong> without any file content to our server.<\/li>\n<\/ul>\n<\/li>\n<li>Isn&#8217;t it beautiful, We have saved our server for such large overhead of validating and processing unnecessary file and from polluting our server environment with unnecessary processing.<\/li>\n<\/ol>\n<p>&nbsp;<br \/>\nHope this help and make you familiar with conditional request policies if you don&#8217;t know about it yet. There are many other policies like &#8220;If-Match&#8221;, &#8220;If-None-Match&#8221;, &#8220;If-Unmodified-Since&#8221;, &#8220;If-Range&#8221;. For more details refer : <a href=\"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html#sec14.24\" title=\"Conditional Policy Request\" target=\"_blank\">http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html#sec14.24<\/a><br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, Before writing this blog, I would first like to make you familiar with one quote &#8220;Be liberal in what you accept, and conservative in what you send&#8221;. Yes that&#8217;s what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400 [&hellip;]<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1,"footnotes":""},"categories":[1],"tags":[18,1389,4840,9,1157,4844,1393,1390,1392,1391],"class_list":["post-13023","post","type-post","status-publish","format-standard","hentry","category-technology","tag-apache","tag-conditional-policy-request","tag-grails","tag-groovy","tag-http","tag-java","tag-last-modified","tag-modified","tag-request","tag-unmodified"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hi, Before writing this blog, I would first like to make you familiar with one quote &quot;Be liberal in what you accept, and conservative in what you send&quot;. Yes that&#039;s what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Tarun Pareek\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Hi, Before writing this blog, I would first like to make you familiar with one quote &quot;Be liberal in what you accept, and conservative in what you send&quot;. Yes that&#039;s what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hi, Before writing this blog, I would first like to make you familiar with one quote &quot;Be liberal in what you accept, and conservative in what you send&quot;. Yes that&#039;s what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#article\",\"name\":\"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog\",\"headline\":\"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/tarun\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2014\\\/04\\\/oct-cartoon1.jpg\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#articleImage\"},\"datePublished\":\"2014-04-18T20:00:11+05:30\",\"dateModified\":\"2014-04-19T11:15:14+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#webpage\"},\"articleSection\":\"Technology, apache, Conditional Policy Request, Grails, Groovy, http, Java, last-modified, Modified, Request, Unmodified\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#listItem\",\"name\":\"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#listItem\",\"position\":3,\"name\":\"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/tarun\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/tarun\\\/\",\"name\":\"Tarun Pareek\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/0a83bd26-2bc9-45ee-9557-a0a9d3dce30d_446-Tarun-Pareek-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Tarun Pareek\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/\",\"name\":\"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog\",\"description\":\"Hi, Before writing this blog, I would first like to make you familiar with one quote \\\"Be liberal in what you accept, and conservative in what you send\\\". Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/tarun\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/tarun\\\/#author\"},\"datePublished\":\"2014-04-18T20:00:11+05:30\",\"dateModified\":\"2014-04-19T11:15:14+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog","description":"Hi, Before writing this blog, I would first like to make you familiar with one quote \"Be liberal in what you accept, and conservative in what you send\". Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400","canonical_url":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#article","name":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog","headline":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/tarun\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2014\/04\/oct-cartoon1.jpg","@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#articleImage"},"datePublished":"2014-04-18T20:00:11+05:30","dateModified":"2014-04-19T11:15:14+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#webpage"},"articleSection":"Technology, apache, Conditional Policy Request, Grails, Groovy, http, Java, last-modified, Modified, Request, Unmodified"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/www.tothenew.com\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#listItem","name":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#listItem","position":3,"name":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/tarun\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/tarun\/","name":"Tarun Pareek","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/0a83bd26-2bc9-45ee-9557-a0a9d3dce30d_446-Tarun-Pareek-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Tarun Pareek"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/","name":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog","description":"Hi, Before writing this blog, I would first like to make you familiar with one quote \"Be liberal in what you accept, and conservative in what you send\". Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/tarun\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/tarun\/#author"},"datePublished":"2014-04-18T20:00:11+05:30","dateModified":"2014-04-19T11:15:14+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog","og:description":"Hi, Before writing this blog, I would first like to make you familiar with one quote &quot;Be liberal in what you accept, and conservative in what you send&quot;. Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400","og:url":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing | TO THE NEW Blog","twitter:description":"Hi, Before writing this blog, I would first like to make you familiar with one quote &quot;Be liberal in what you accept, and conservative in what you send&quot;. Yes that's what HTTP robustness protocol states. Scenario : We have a use case where our server need to read XML files that are large containing 400","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"13023","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:02:18","updated":"2024-02-29 10:47:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tApache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Technology","link":"https:\/\/www.tothenew.com\/blog\/category\/technology\/"},{"label":"Apache HTTP Conditional Policy Requests for checking whether resource is modified or not and reduce unnecessary processing","link":"https:\/\/www.tothenew.com\/blog\/apache-http-conditional-policy-requests-for-checking-whether-resource-is-modified-or-not-and-reduce-unnecessary-processing\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/13023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=13023"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/13023\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=13023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=13023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=13023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}