How to disable cache on Wildfly

I use VRaptor 4 with Wildfly 9, and I realized that my localhost navigation, when updating or drawing to other people's pages, HTML content reloads normally. But in another host (for example: production) I need to clear my browser cache in order to refresh the page. Example. If I send a message to display a warning in viewing mode and navigate between other pages, and I go to the previous page, the warning remains displayed. I need to clear the cache to disable the warning.

How can i fix this?

+4
source share
1 answer

.

<subsystem xmlns="urn:jboss:domain:undertow:1.2">
   ...
   <server name="default-server">
      <host name="default-host" alias="localhost">
         ...
         <filter-ref name="cache-control" predicate="path-suffix['.jsp'] or path-suffix['.jsf']"/>
      </host>
   </server>

   <filters>
      <response-header name="cache-control" header-name="Cache-Control" header-value="no-cache"/>
   </filters>
</subsystem>

, . http://undertow.io/undertow-docs/undertow-docs-1.2.0/predicates-attributes-handlers.html. . Cache-Control jsp/jsf, . , .

+7

All Articles