jquery - The response.setheader on a java servlet does not disable browser cache -


what trying do

goal 1. not allow browser cache responses server 2. after session logout button should not bring user cached page

what have done far

in web app, have login page authenticates user , routes page via login servlet. in login servlet have set response header not cache html pages. not work.

currently use below in dopost method of login servlet

response.setheader("cache-control","no-cache, no-store, must-revalidate"); response.setheader("pragma","no-cache"); response.setheader("max-age", "-1"); response.setdateheader("expires", 0); 

results html page header (from google chrome dev tools ) shows this

accept-ranges:bytes content-length:8404 content-type:text/html date:sat, 16 jan 2016 22:26:57 gmt etag:w/"8404-1452983191066" last-modified:sat, 16 jan 2016 22:26:31 gmt server:apache-coyote/1.1

any suggestions people.. in advance time?


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -