I want in my HATS web project that all the JS and CSS file must be cached for improving the response time of the application but when I see the source code of my JSPs I find that HATS its self include following line of code in the header of each JSPs
<meta http-equiv="Cache-control" content="no-cache">
How can I remove this line of code form my HATS application for making sure that my application is doing cache to JS, CSS and image files.
SanthiRamala 270005C9FS39 Posts
Re: Cache-control in HATS2013-03-25T15:38:04ZThis is the accepted answer. This is the accepted answer.Hi Sami,
For my application I have used below approach to make cache enabled:
-> Know the template which you have chosen in HATS application. For example if you have Finance as your template then open the Finance.jsp ( HATSProject\Web Content\templates\Finance.jsp )
To know the template which you have selected in HATS project, go to HATS project view expand to <HATSProject> -> Web Content -> Templates-> which ever is selected as default is the template
-> In <template> jsp file, in our example in Finanace.jsp after line <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> add <meta http-equiv="Cache-control" content="private">
You will find duplicate meta cache-control tags but recent(later) one would be considered always.
Hence this would allow browser to cache the js, css and image files.
SystemAdmin 110000D4XK1192 Posts
Re: Cache-control in HATS2013-03-27T10:30:57ZThis is the accepted answer. This is the accepted answer.
- SanthiRamala 270005C9FS
You can remove the cache control and can edit the meta cache tag as per your requirement,
Here is the way
1)Remove below HATS tag from the template
<HATS:Util type="baseHref" />
2) Add below line of code which is editable as per your requirements, make cache private, public or what you want.
<meta http-equiv="Pragma" content="Public">
<meta http-equiv="Cache-control" content="Public">
Remember on thing on <BASE href="put the path of your template">