Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Support of If-Modified-Since HTTP header I'm not sure if this is better in this forum or in the Server Fault forum... On Google Webmaster Guidelines I see this: "Make sure your web server supports

@Nimeshi995

Posted in: #GoogleSearchConsole

I'm not sure if this is better in this forum or in the Server Fault forum...

On Google Webmaster Guidelines I see this:

"Make sure your web server supports the If-Modified-Since HTTP header. This feature allows your web server to tell Google whether your content has changed since we last crawled your site. Supporting this feature saves you bandwidth and overhead."

(at this link: www.google.com/support/webmasters/bin/answer.py?answer=35769#1 )

I contacted Godaddy and they told me:

"I understand you would like to know if your server currently has the "If-Modified-Since HTTP header" installed. I used an external tool to test this and found that it is not currently being utilized by your server. Additionally I was unable to find a reliable source to get specific requirements on what this server needs to function. In order to determine if your server supports this you will need to provide us the exact specifications required to run it."

How do I ensure the If-Modified-Since HTTP header is supported and that it is active?

Thanks

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

2 Comments

Sorted by latest first Latest Oldest Best

 

@Shelton105

This If-Modified-Since header is sent by client and not server: Server just has to respond accordingly. This request header "Allows a 304 Not Modified to be returned if content is unchanged"


A conditional GET method requests that the identified resource be
transferred only if it has been modified since the date given by the
If-Modified-Since header. The algorithm for determining this includes
the following cases:


If the request would normally result in anything other than a 200
(ok) status, or if the passed If-Modified-Since date is invalid, the
response is exactly the same as for a normal GET. A date which is
later than the server's current time is invalid.
If the resource has been modified since the If-Modified-Since
date, the response is exactly the same as for a normal GET.
If the resource has not been modified since a valid
If-Modified-Since date, the server shall return a 304 (not modified)
response.


The purpose of this feature is to allow efficient updates of cached
information with a minimum amount of transaction overhead.


It worth mentioning that wit ill automatically work for static files only (as such files are server directly by web server (Apache/IIS/etc) and it can detect the changes. For dynamically produced pages (by PHP/ASP.NET etc), you will need to implement your own logic inside the code that generates that page if you want to handle such request header efficiently.

You will not see this implemented for dynamically generated pages very often, unless you have very good full-page caching system in place -- either by Framework you use, by web server (IIS can do this) or maybe your proxy (like Varnish, for example).

Both Apache and Microsoft IIS do support these request headers (as they are that are used by GoDaddy on Shared Hosting plans).

www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25 http://en.wikipedia.org/wiki/List_of_HTTP_header_fields



Here is one tool (untested by me) that can check if your website supports this header. Obviously, the result will depend on what resource you will request (static file or dynamically generated page):

www.feedthebot.com/tools/if-modified/

10% popularity Vote Up Vote Down


 

@Bryan171

If you're running Apache, you need the mod_expires and mod_headers modules to be installed and enabled. Your web host may need to recompile Apache to include them if they're not installed.

With mod_expires and mod_headers active, you can send and control the Last-Modified header by editing your .htaccess file to include:

# Expire all files one week after they're accessed
ExpiresActive On
ExpiresDefault "access plus 1 week"


More information and settings available from the Apache mod_expires documentation.

By serving content with a Last-Modified header, your site will now support requests from clients that use If-Modified-Since headers.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme