Hi, I have developed a dynamic web application that uses Ajax to retrieve data from databases and update the GUI, but when testing it with IE8 I have problems with caching.
I used the following code in the webmvc-config.xml file to stop caching:
<mvc:annotation-driven /> <mvc:interceptors> <bean id="webContentInterceptor" class="org.springframework.web.servlet.mvc.WebContentInterceptor"> <property name="cacheSeconds" value="0"/> <property name="useExpiresHeader" value="true"/> <property name="useCacheControlHeader" value="true"/> <property name="useCacheControlNoStore" value="true"/> </bean> </mvc:interceptors>
and it works exactly as it should, but the problem is that the browser is now clearly not caching anything. I want to know how to change this xml code so that it applies to parts of the Ajax web application (which are managed using 5 Controller files); so are the ..etc icons still cached? The path to these controller files will look like "/ admin / **"
I know that Spring WebContentInterceptor has properties such as "setCacheMappings" and "setPathMatcher", but there is nowhere else on the Internet that I can find examples of using these files in the xml configuration file.
ANY help would be greatly appreciated, it really makes my head in .. Thanks. Jake
source share