Website caching enables the storing of previously retrieved web page content and resources for faster repeat viewing and an overall improved user experience.
Caching is implemented at both the webserver and in the browser client. For the TTerm Connect Administration Portal no extra configuration is required. The Administration Portal runs its own, self contained webserver and applies HTTP headers which direct the browser to always retrieve the latest content when loading pages and resources.
The Desktop Client, on the other hand, is served through third party webserver software such as Apache or IIS. In this instance it is important that cache settings are configured appropriately through your webserver. This will ensure that when TTerm Connect is upgraded to a new version your users always receive updated content without any extra actions required on their part.
The configurations below are examples only.
The samples provided for Apache and IIS below are intended as examples only and there are typically multiple methods of implementing cache control. Always refer to your 3rd party software documentation for the most up to date and appropriate methods
IIS 7.0 and Above
For Microsoft’s Internet Information Services webserver cache control can be implemented through the web.config file, an XML file which is placed in the root directory of the target website. Creating a web.config file with the following content will ensure that important TTerm Connect Desktop Client resources are not cached.
<?xml version="1.0" encoding="UTF-8"?> <configuration> <location path="index.html"> <system.webServer> <httpProtocol> <customHeaders> <add name="Cache-Control" value="no-cache, no-store, must-revalidate" /> <add name="Pragma" value="no-cache" /> <add name="Expires" value="-1" /> </customHeaders> </httpProtocol> </system.webServer> </location> <location path="desktop.html"> <system.webServer> <httpProtocol> <customHeaders> <add name="Cache-Control" value="no-cache, no-store, must-revalidate" /> <add name="Pragma" value="no-cache" /> <add name="Expires" value="-1" /> </customHeaders> </httpProtocol> </system.webServer> </location> <location path="js/ttc.config.js"> <system.webServer> <httpProtocol> <customHeaders> <add name="Cache-Control" value="no-cache, no-store, must-revalidate" /> <add name="Pragma" value="no-cache" /> <add name="Expires" value="-1" /> </customHeaders> </httpProtocol> </system.webServer> </location> </configuration>
Apache
To configure cache control in Apache first ensure the Headers modules (mod_headers) in enabled in your installation. This enables control and modification of HTTP request and response headers. Modify the TTerm Connect site configuration ( .conf) file to set an appropriate cache control header for the matched files:
<FilesMatch "(index.html|desktop.html|ttc.config.js)"> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "-1" </FilesMatch>
After saving the configuration file Apache will need to be reloaded.