I want to disable caching in a CQ component and I have the following line in my jsp (documentation):
response.setHeader("Dispatcher", "no-cache");
If I insert the component in a page and load the page in an authoring instance everything works as expected and I get an HTTP header named Dispatcher
with the content no-cache
.
Now if I do the same on a publishing instance (same configuration with CQ_RUNMODE='publish'
and same content) the component works but for setting the HTTP header.
Any idea on why the two instances could behave differently?
Update
I tried to set other headers and the instance behaves in the same way: in the authoring mode the headers are generated in the publishing mode not (same configuration but for the CQ_RUNMODE
)
Update 2
I was trying to reduce my example by removing everything that is unnecessary from the page (layout, code for headers, footer, ...) and I noticed that after a certain size threshold my header is correctly generated.
In other words by removing stuff from the page (even simple HTML) I reach a certain point where the header appears (if the page is small enough).
Any idea on why CQ is only generating the header for very small pages?