what is If-Modified-Since HTTP header how to add to WordPress website

what is If-Modified-Since HTTP header?

it’s HTTP header request to google bot. if your sever support
If-Modified-Since HTTP header it’s shows last modified content to Google bot. and google bot can download this and quick index your website get in search results very quickly.
blogger platform supports this. some of web hosting companies may not supports. if your website not support HTTP header modified since then ask your web host providers.
when you choosing a right web host company worth to ask If-Modified-Since HTTP header supports or not.
you don’t need to worry about this unless you have thousand of webpages and updates daily.

 There is option to add If-Modified-Since HTTP header to WordPress site.

 you can do this by adding below code header("Last-Modified: " . the_modified_date()); to wp-config.php at the end of it before ?>.
or before /* That’s all, stop editing! Happy blogging. */

This also not working as error says “Fatal error: Call to undefined function the_modified_date() “

2nd method using plugins.

Just Install w3 total cache plugin, if you are in managed WordPress hosting, you have to look for alternatives.

1.Add Headers
Adds the ETag, Last-Modified, Expires and Cache-Control headers to HTTP responses generated by WordPress to facilitate caching.
this plugin working to enable if  modified since for WordPress

https://wordpress.org/plugins/header-last-modified/
 Adds post last modified to HTTP header to enable squid or cdn to cache your wordpress web page. Squid will not cache the page without http header field.

 it works on posts only not for the homepage.

3. I prefer second plugin because 1st plugin have more functions may be it can vulnerability with w3 total cache plugin .
4. If Modified Since HTTP Header

A simple plugin to sent “304 If Modified Since HTTP Header” to the web crawlers, so that they only fetch your site when something updated.

https://wordpress.org/plugins/if-modified-since-header/
NOT WORKING on the home page.
also try edit wp-confing.php
add below code at the end confing php before it closes before ?>
("Last-Modified: " . the_modified_date());
also follow this thread on stackoverflow.

Enabling  If-Modified-Since HTTP header by .htaccess 

# enable expirations
ExpiresActive On
# expire GIF images after a month in the client’s cache
ExpiresByType image/gif A2592000
# HTML documents are good for a week from the
# time they were changed
ExpiresByType text/html M604800

where to check If-Modified-Since HTTP header supports or not?

you can check here.
also here

rresources
https://discussion.dreamhost.com/thread-6497.html

http://webmasters.stackexchange.com/questions/19189/support-of-if-modified-since-http-header
https://support.google.com/webmasters/answer/35769#1