Quantcast
Channel: Adobe Community : All Content - All Communities
Viewing all articles
Browse latest Browse all 290743

Cache Response Headers in Dispatcher?

$
0
0

Hi,

 

I noticed in the following link:  http://dev.day.com/docs/en/cq/current/deploying/dispatcher.html

 

"Due to this, the Dispatcher stores only the HTML code of the page - it does not store the HTTP headers. This can be an issue if you use different encodings within your website, as these may get lost."

 

I created a JSON renderer, which sets the content type in the header to be JSON:

 

response.addHeader("Content-Type", "application/json");

 

This works the first time (before caching)

 

However, once cached by the dispatcher, the server sets the content type as "application/x-javascript"

 

I am guessing there is no way to override this.  Any ideas?

 

Thanks


Viewing all articles
Browse latest Browse all 290743

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>