answersLogoWhite

0

By setting properties that prevent caching in your JSP Page. They are:

<% response.setHeader("pragma","no-cache");//HTTP 1.1

response.setHeader("Cache-Control","no-cache");

response.setHeader("Cache-Control","no-store");

response.addDateHeader("Expires", -1);

response.setDateHeader("max-age", 0);

//response.setIntHeader ("Expires", -1);

//prevents caching at the proxy server

response.addHeader("cache-Control", "private"); %>

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How do you clear the browser cache in jsp?

Hi to prevent the browser from cache. You have to implement the following code at top of the .jsp page. You will need to set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. Just execute the following scriptlet at the beginning of your JSP pages to prevent them from being cached at the browser. You need both the statements to take care of some of the older browser versions. &lt;% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %&gt;


How do you prevent the output of JSP or Servlet pages from being cached by the browser?

Add the following lines to your JSP: response.setHeader("Cache-Control", "no-cache"); response.setHeader("Pragma", "no-cache"); response.setDateHeader("Expires", -1); The first line works for HTTP/1.1 clients. The second line works for HTTP/1.0 clients. The third line will tell the browser the content is expired, so if the first two lines don't work, hopefully the third will.


How do you disable back button of browser in jsp code?

by good


How validate and retrieve data from database in jsp?

We can do validation by using JavaScript. Here we are using function Validate(). Iam creating one JSP name index.jsp &amp; give a link to another JSP name basic.jsp. In that Jsp iam using Type 1 Jdbc Driver &amp; giving a database connection


How the data is viewed in a JSP in the form of table?

You can display data in Tabular format in a JSP page using the HTML &lt;Table&gt; Tag. You can even assign dynamic values to the table using JSP Scriptlets. &lt;% %&gt;


Can you create web forums using jsp and servlets?

Yes. All sorts of web Applications/websites can be created using JSP and Servlets


Is jsp a language.justify?

JSP stands for Java Server Page, which is a program that controls how things appear on a webpage. JSP is not considered a language but it is written for programs using the programming language of JavaScript.


How do you create chart using ireport in jsp?

you die.


How do we find a jsp version in Java?

first you have to find out what version of j2ee you are using then from there you can lookup the jsp version for that version of j2ee


What is session in jsp?

Session in the JSP and Servlet context refers to an instance of the HttpSession object that contains all the information about the current user session with the web application. This can be used as a cache or temporary storage area to store values that might be required across the application.


How do you transfer values from javascript to JSP?

You can set the value in the hidden form fields using javascript and access the form fields in JSP


Create a table using JSP Servlets?

scope of operater