Pid wrote: > Erica Zhang wrote: >> Hi, >> I want to cache the responses for XMLHttpRequest, that is dynamic >> content. I have configureed http.conf using Expires to add headers to >> those responses. However, I still could not find those responses to >> be able to be cached by use of web browser (Firefox 2.0). >> Also, I tried to add Header to enable Cache-Control and etc. However >> they could not work either. >> So I am not sure if there is a way to cache XMLHttpRequest. >> Thanks, >> Erica > > Apache doesn't know that a given request is an XMLHttpRequest - it's > no different from a normal request. > > Are the requests that you're making identical each time? > Can you post some examples of the URL that's being requested? > > What does your access_log say, e.g. is it returning 200 for each request? > > > p > > > >> --------------------------------------------------------------------- >> The official User-To-User support forum of the Apache HTTP Server >> Project. >> See <URL:http://httpd.apache.org/userslist.html> for more info. >> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx >> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx >> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx >> >> > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server > Project. > See <URL:http://httpd.apache.org/userslist.html> for more info. > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx > " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx > > might also be worth reading this: http://www.mnot.net/cache_docs/ http://www.mooreds.com/wordpress/archives/000382 the 2nd of which has links to caching support in browsers Basically it is possible, driven by the browser, and different headers take priority, and you have to code your application to use caching, sending if-modified0since and sometimes other headers in order to get the deisired response, use a proxy to discover what your browser says to the server, and replicate that in your xhr calls. -- Matthew Farey --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx