by Dinesh Thakur Category: Basic Servlet Examples

By default every web resource program generated output/response content will be stored in the buffer before it is getting displayed on browser window as web page content. Due to this browser window may show old output collected from the buffer even though the web resource program of web application is capable of generating new and updated output.   

                                                    

* To solve the above problem instruct browser window for not storing the output in the buffer from web resource program through web server by using response headers as shown below.

res. setHeader (“cache-control”, “no-cache”); //for http 1.1 based servers

res. setHeader (“pragma”, “no-cache”); //for http 1.0 based servers

* Buffer is a temporary memory which stores the data for temporary period. Buffer is also called as cache.



About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.