Created by: George Goglidze Berdzenishvili on 14-06-2012 08:26:46 AM i all, I'm trying to set expires header correctly on the pages, to the old date. so that ip phone does not keep it in cache. I set it via the following way: response.setContentType("text/xml"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader(HttpHeaders.EXPIRES, HttpFields.parseDate("Sat, 26 Jul 1981 05:00:00 GMT")); response.setHeader("Pragma", "no-cache"); response.setDateHeader("Max-Age", 0); response.setStatus(HttpServletResponse.SC_OK); and I can see in the wireshark traces that it's correctly set. file attached. but when someone clicks the back key (SoftKey:Exit) it still navigates to that page. can anyone tell me what I'm doing wrong? Thanks,
Subject: RE: java +jetty +EXPIRES header Replied by: George Goglidze Berdzenishvili on 14-06-2012 09:28:17 AM Hi,
Thanks for your answer Florian! I have tried that as well, but it does not work unfortunately.
I do not know what else to do to make it work.
Subject: RE: java +jetty +EXPIRES header Replied by: Sergei Gorbunov on 14-06-2012 10:56:39 AM What IP phone you use? Do you set the AppId tag?
Subject: RE: java +jetty +EXPIRES header Replied by: George Goglidze Berdzenishvili on 14-06-2012 11:03:47 AM Hi Sergei,
Yes, I am in fact setting the appID flag...
for example:
msg += "<CiscoIPPhoneMenu appID=\"MY/APP\">\n";
Subject: RE: java +jetty +EXPIRES header Replied by: George Goglidze Berdzenishvili on 14-06-2012 02:47:43 PM it's fixed now!!!!
I didn't realize I had to set the Date header as well for Expire header to work )))
here's the code finally:
Date dt = new Date(); response.setDateHeader("Date",dt.getTime()); dt.setTime(dt.getTime() - 60000); response.setDateHeader("Expires",dt.getTime());
now it all works fine! )))
Thanks all for your help,
Subject: RE: java +jetty +EXPIRES header Replied by: Florian Kroessbacher on 14-06-2012 08:37:18 AM Hy outh there
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: