[webkit-dev] Does WebKit support 304 Not Modified for Ajax requests?

David Kilzer ddkilzer at webkit.org
Fri May 9 10:47:55 PDT 2008


Hi Scott,

This sounds like a bug.  Please file a bug on <https://bugs.webkit.org/>.

Attaching a small reproducible sample script to the bug would be extremely
helpful as well.  Thanks!

Dave


Scott Schmitz <scott at realorganized.com> wrote:

> I have a web application that makes extensive use of xmlhttprequest  
> (AJAX).  I have optimized these GET requests such that the server will  
> return a 304 not modified if the ETag matches up from a prior  
> request.  That way, if the browser cache already has the data, I just  
> send the header back and not the data itself.
> 
> This works great for Firefox and Internet Explorer.  In the case of  
> those browsers, I return ETag and last modified headers for the  
> initial request.  The browser caches the data and includes
> 
> If-Modified-Since:
> If-None-Match:
> 
> headers when it makes a request again.  If the server determined that  
> the cache is good, it returns
> 
> 304 not-modified response and all is good.
> 
> WebKit and Safari do not do this.  Best I can see, the browser makes  
> its request and does not include any Etag at all.  I see this via Web  
> Inspector - Network Panel.
> 
> Anyone know what is going on?
> 
> thanks,
> 
> Scott Schmitz
> RealOrganized, Inc.
> http://www.realorganized.com





More information about the webkit-dev mailing list