Clearing cache on user browser


There is an intermittent issue with our UI running Jaspersoft reports where the browser hangs.  The fix seems to be to clear the browser cache, or to open an Incognito window which starts with a new empty cache.  Need your help to research whether there are any options on the Jaspersoft server that tell the browser not to cache?  Is there a way to send any HTTP headers or Jaspersoft specific instruction to the browser that controls caching?

ruthran's picture
Joined: May 8 2012 - 9:19pm
Last seen: 1 week 3 days ago


Cache control can done through applicationContext-webapp.xml file.

Could you try to add below lines for cache control in file /WEB-INF/applicationContext-webapp.xml.

<bean p:method="GET" p:urlPattern="/rest_v2/reportExecutions/.*" class="com.jaspersoft.jasperserver.war.httpheaders.HeadersRule"> <property name="headers"> <list>

<bean class="org.apache.http.message.BasicHeader">

<constructor-arg value="Cache-Control"/>

<constructor-arg value="no-cache,no-store"/>


<bean class="org.apache.http.message.BasicHeader">

<constructor-arg value="Pragma"/>

<constructor-arg value="no-cache"/>



</property> </bean>

Try adding it under <property name="headersRules">

sthomas_3 - 3 weeks 6 days ago

0 Answers:

No answers yet