- 01 Sep 2022
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Hosting content on a Private server
- Updated On 01 Sep 2022
- 1 Minute To Read
-
Print
-
DarkLight
-
PDF
Whatfix content can be easily exported and deployed from your servers. Self-hosting is useful when you are on an internal network and cannot access the Flows from the Whatfix cloud or when your IT security doesn't allow resource loading from remote servers.
Use the following steps to host Whatfix content on your server,
-
Navigate to the Whatfix Dashboard.
-
On the top right, click the Settings icon.
-
Click Export Content.
If you do not see the Export Content option, contact [email protected].
-
Click Export.
-
A download link is sent to your registered email address.
-
Click the link to download the file.
-
Extract the content of the zip file to your server. The extracted folder contains a file called embed.nocache.js inside the embed folder.
-
This file needs to be added as a static file in your application's HTML file as shown in the following code snippet.
<script type="text/javascript" src="/public/whatfix.com/embed/embed.nocache.js"></script>
Server Setting
Make sure your web server has Cache-control set to "no-cache" for the *.nocache.js files so that the request to the origin server is validated before releasing a cached copy.
The following are the popular Web servers and their no-cache settings,
Apache:
<FilesMatch ".(nocache.js)$">
Header set Cache-Control no-cache
< /FilesMatch>
Nginx:
location ~ ^.*(nocache.js)$
{
add_header Cache-Control no-cache;
}