answersLogoWhite

0


Best Answer

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. <% 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 %>

User Avatar

Wiki User

โˆ™ 2009-07-26 02:35:33
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
User Avatar
Study guides
๐Ÿ““
See all Study Guides
โœ๏ธ
Create a Study Guide

Add your answer:

Earn +20 pts
Q: How do you clear the browser cache in jsp?
Write your answer...
Submit
Related questions

How do you clear the browser cache in HTML?

You can easily clear the browser cache. It can be done in the setting under the history tab and then clear cache.


How do you clear the browser's cache on a computer downloaded with Windows7?

You can clear the cache by going in the settings. Search for history and cache and you can clear it from there.


Can you erase your cache?

Yes, there is an option in your browser settings to clear your cache.


How can one clear browser cache?

Someone attempting to clear the browser cache for Chrome can do so by clicking on the "Settings" button, click on the "History" tab and select "Clear Browsing Data". Check the "Empty the cache" check-box and continue to clear the browsing data.


How does one clear cache in an internet browser?

It depends on which internet browser that you use. However, generally if you go to the settings/tools and look for 'clear history' or a button which indicates the cache, if you click that it will most likely come up with instructions to clear your cache.


How do you clear a web browser?

A web browser can be cleared by clearing it's history from it. This can be done by Clearing the browser cache.


How to Remove cache from browser using jsp?

By setting properties that prevent caching in your JSP Page. They are: &lt;% 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"); %&gt;


Why do you clear your browser's cache?

One would clear their browsers' cache if they wanted to be sure that they receive the very latest from the webpage(s) they are visiting.


How to clear the physical memory?

To clear physical memory in a computer, it is best to purge the Internet files in the browser. To do this, clear the browser's cache, which is typically listed under "options."


How do you delete cache and cookies in Google Chrome web browser?

Deleting cookies and cache is easy in Google Chrome. You have to go to settings and then history, Clear browsing data will help you to clear cache or cookies.


What do you do when Farmville is not loading all the way?

Clear your browser cache, cntrl+shift+del while on your browser. then try again.


How do you clear the computer cache when using the internet explorer?

In almost any internet browser, simply go to tools, clear history. or you can go to the settings and on the general tab will be a clear cache button.


What is Internet browser cache?

Internet browser cache is temporary information stored by browser. The cache helps in faster access of the web pages.


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.


When you sign in badoo this error appear this page is temporarily unavailable how can you log in?

Clear your browser cache


The temporary file storage area of a Web browser is also called a?

Browser Cache


How can you use the word cache in a sentence?

You should clear your browser's cache if things begin playing up.The cache of weapons was intercepted by the police.


Why won't my character load on Roblox?

If your character is not loading on Roblox try to clear your cache and cookies in the browser.


How can you join Skyrim after it shows the 'access denied' message?

Clear your browser cache, that should solve your problem.


How do you clear my browser's cache?

Tools -&gt; Options -&gt; Advanced tab -&gt; Network sub tab -&gt; Offline storage section -&gt; Clear Now button


Where is cache on iPhone How to clear cavje?

How to clear cache on iphone


Why won't internet connek to battlefield play4free?

Clear da cache and da history, and restart da browser.


Why is fullscreen button in youtube safari not working?

Clear your browser cache and cookies. After clearing both of them, refresh the page.


Why do your pages load so slowly?

If you have a slow PC or internet connection pages can load slowly, alternatively your browser could be weighed down, clearing your browser cache could solve it. Lookup how to clear the page cache from your browser (Google it). I don't know which one your using, but on chrome you can do it from within the Settings, History and Clear History


Why does Answers.com crash my computer every time?

Clear your browser cache or use a different browser. Its not the site crashing the browser, but a one of your plugins not being up to date or working correctly with the site.