{"id":36833,"date":"2016-10-12T18:43:06","date_gmt":"2016-10-12T15:43:06","guid":{"rendered":"https:\/\/tuthost.ua\/faq\/why-the-server-does-not-give-the-date-of-the-last-change-of-the-document\/"},"modified":"2024-07-19T23:00:45","modified_gmt":"2024-07-19T20:00:45","slug":"pochemu-server-ne-vydajot-datu-poslednego-izmeneniya-dokumenta","status":"publish","type":"ht_kb","link":"https:\/\/tuthost.ua\/en\/faq\/pochemu-server-ne-vydajot-datu-poslednego-izmeneniya-dokumenta\/","title":{"rendered":"Why the server does not give the date of the last change of the document?"},"content":{"rendered":"<p>For static documents, the server actually outputs the date of the last change. However, if the formation of your pages has a dynamic nature (for example, using PHP), then you should form this parameter yourself.<\/p>\n<p>You can do this in the following ways:<\/p>\n<p>In PHP &#8211; add this line to the script<br \/>\nheader(&#8220;Last-Modified: &#8220;.gmdate(&#8220;D, d M Y H:i:s&#8221;).&#8221; GMT +0200&#8243;);<br \/>\nThis code gives the date of the last change as the current date, which is generally true &#8211; searchers will feel that the document has literally just been changed.<\/p>\n<p>Or, using the capabilities of .htaccess, write the following lines:<br \/>\nExpiresActive on<br \/>\nExpiresByType text\/html &#8220;access plus 3 days&#8221;<br \/>\nor<br \/>\nHeader set Last-Modified &#8220;15 Jun 2004 12:00:00 GMT&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For static documents, the server actually outputs the date of the last change. However, if the formation of your pages has a dynamic nature (for example, using PHP), then you should form this parameter yourself. You can do this in the following ways: In PHP &#8211; add this line to the script header(&#8220;Last-Modified: &#8220;.gmdate(&#8220;D, d&#8230;<\/p>\n","protected":false},"author":4,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"inline_featured_image":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","ghostkit_customizer_options":"","ghostkit_custom_css":"","ghostkit_custom_js_head":"","ghostkit_custom_js_foot":"","ghostkit_typography":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"ht-kb-category":[10692],"ht-kb-tag":[],"class_list":["post-36833","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-mistakes-problem-solving"],"taxonomy_info":{"ht_kb_category":[{"value":10692,"label":"Mistakes, problem solving"}]},"featured_image_src_large":[],"author_info":{"display_name":"\u041e\u043b\u0435\u0433 \u041f\u043e\u043a\u043e\u0442\u0438\u043b\u043e","author_link":"https:\/\/tuthost.ua\/en\/author\/oleg-tuthost-com\/"},"comment_info":0,"_links":{"self":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/36833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/comments?post=36833"}],"version-history":[{"count":1,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/36833\/revisions"}],"predecessor-version":[{"id":52458,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb\/36833\/revisions\/52458"}],"wp:attachment":[{"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/media?parent=36833"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-category?post=36833"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/tuthost.ua\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=36833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}