{"id":267,"date":"2009-12-08T11:34:03","date_gmt":"2009-12-08T18:34:03","guid":{"rendered":"http:\/\/cknotes.com\/?p=267"},"modified":"2009-12-08T11:34:03","modified_gmt":"2009-12-08T18:34:03","slug":"http-cache-control","status":"publish","type":"post","link":"https:\/\/cknotes.com\/http-cache-control\/","title":{"rendered":"HTTP Cache-Control"},"content":{"rendered":"<p><strong>Question:<\/strong><\/p>\n<p>Using the HTTP component I&#8217;m connecting and downloading an RSS feed via a Proxy server (fantastic!!).<br \/>\nTrouble is &#8211; the proxy is caching yesterday&#8217;s feed and I need to force the proxy to refresh it&#8217;s contents (that&#8217;s the proxy on my network &#8211; not the Chilkat local cache).<\/p>\n<p>How can I tel the HTTP component to force the proxy to refresh?<\/p>\n<p>I tried setting:<\/p>\n<p>http.FreshnessAlgorithm = 1;<br \/>\nhttp.DefaultFreshPeriod = 1;<br \/>\nhttp.MaxFreshPeriod = 1;<\/p>\n<p>to no avail.<\/p>\n<p>Regards,<\/p>\n<p>***<br \/>\nLicensed (and happy) Chilkat User&#8230;.<\/p>\n<p><strong>Answer:<\/strong><\/p>\n<p>The <a href=\"http:\/\/www.w3.org\/Protocols\/rfc2616\/rfc2616-sec14.html\">HTTP header field definitions are defined here<\/a>.  Any header may be explicitly added to an HTTP request sent by Chilkat HTTP.  For QuickGet* methods, call the SetRequestHeader method.  The header you&#8217;ll probably want to add is &#8220;Cache-Control&#8221;, like this:<\/p>\n<pre>\r\nhttpObject.SetRequestHeader(\"Cache-Control\",\"no-cache\");\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Question: Using the HTTP component I&#8217;m connecting and downloading an RSS feed via a Proxy server (fantastic!!). Trouble is &#8211; the proxy is caching yesterday&#8217;s feed and I need to force the proxy to refresh it&#8217;s contents (that&#8217;s the proxy on my network &#8211; not the Chilkat local cache). How can I tel the HTTP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[262,428],"class_list":["post-267","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-cache-control","tag-http"],"_links":{"self":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/267","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/comments?post=267"}],"version-history":[{"count":0,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/267\/revisions"}],"wp:attachment":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/categories?post=267"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/tags?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}