Web Programming

A

arvind

hi all,

i am working on java-jsp application and using MS-SQL database.
when i do any update operation using front screen(in html),it gets
updated in the database but it dosen't show those updates in the
front end.


THE UPDATES ARE SEEN ONLY WHEN THE "EVERY TIME VISIT TO THIS PAGE"
option in "Tools /Internet Options /Settings " of the toolbar is SET.
OR ELSE I HAVE TO CLOSE THE BROWSER AND THEN OPEN A NEW ONE TO GET THE
UPDATES .

i can never know what option my client has set on his terminal.

what could be solution so that my code will be independent of the
internet setting?
please help me out as i am in a great hurry!

thank you.
 
P

Paul Davis

Arvind, you are up against the dreaded browser caching.
Some things you can do are, retreive the page using post instead of
get, change the expire time and last mod time in the response header,
and adding a random query string parameter to the link to the page.
Assuming a J2EE server the following will take care of you headers:
response.setHeader("Cache-Control", "no-store"); //HTTP 1.1
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setDateHeader("Expires", 0); // prevents caching at the proxy
server

For internet explorer you may need a combination of the above.
(note: post instead of get should always work)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top