I am trying to enable 304 If Modified Since HTTP header in my WordPress site. After doing lot of Googling I find out a site where the author said to put the following line at the very end of wordpress wp-config.php file. Here is the line of code:
header("Last-Modified: " . the_modified_date());
Now the author said that this was it. I dont have to do anything else to achieve 304 If Modified Since HTTP header. But after doing this I tested by HTTP header using the site
and here is the screenshot of my header:

Check the red marked section. The last modified header value is BLANK.
After that I thought this might be some issue with the_modified_date() function so I've also tried get_the_modified_date() function. But still no result.
At the very end, I've created a small shortcode function to test if these functions are working or not and echoed it inside the short code. When I used the shortcode I can clearly see that the functions are working fine but for some reason sending blank to the 304 If Modified Since HTTP header.
My site is here
Any suggestions on how to solve this?