WiFiMon uses JavaScript in frequently-visited websites to trigger the tests. In Section 1, we provide the instructions to embed the scripts in your website downloading Images and scripts from our Apache Server, i.e. fl-5-205.unil.cloud.switch.ch that is located in Lausanne, Switzerland.

Notably, measurement results, i.e. Download/Upload Rates and Round Trip Times (RTTs) are relative to the WiFiMon Test Server. In case of the Apache Server located in Lausanne, results are relative to this server. For more accurate results, you may setup your own Apache Server to host the images and scripts that enabled the performance test from your server. The instructions to achieve that are presented in Section 2.

1. Embed Scripts in your Website

WiFiMon is currently using 3 different JavaScript-based test tools to measure the performance of WiFi networks: NetTest, boomerang and speedtest/HTML5. The following paragraphs show the lines that should be included in the HTML code of these websites for each test tool.

1.1. NetTest

Triggering NetTest measurements requires embedding the following lines of code in your website:

<script type="text/javascript" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/nettest/jquery-3.5.1.min.js"> </script>
<script type="text/javascript" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/nettest/nettest-swfobject.js"> </script>
<script type="text/javascript" src="https://www.google.com/jsapi"> </script>
<script type="text/javascript" id="settings" agentIp="xxx.xxx.xxx.xxx" testtool="NetTest"
                           imagesLocation="https://fl-5-205.unil.cloud.switch.ch/wifimon/images/" cookieTimeInMinutes=""
                           src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/nettest/runtests.js" defer></script>

1.2. boomerang

Triggering boomerang measurements requires embedding the following lines of code in your website:

<script type="text/javascript" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/boomerang/jquery-3.5.1.min.js"> </script>
<script type="text/javascript" src="https://www.google.com/jsapi"> </script>
<script type="text/javascript" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/boomerang/boomerang.js"> </script>
<script type="text/javascript" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/boomerang/bw.js"> </script>
<script type="text/javascript" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/boomerang/rt.js"> </script>
<script type="text/javascript" id="settings" agentIp="xxx.xxx.xxx.xxx" testtool="boomerang"
                           imagesLocation="https://fl-5-205.unil.cloud.switch.ch/wifimon/images/" cookieTimeInMinutes="" 
                           src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/boomerang/boomerang-trigger.js" defer></script>

1.3. Speedtest/HTML5

Step 1: Create the following proxy HTML page:

<!DOCTYPE html>
<html>
<head>
<title>Speed worker</title>
<script type="text/javascript" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/speedtest/jquery-3.5.1.min.js"> </script>
<script type="text/javascript" src="https://www.google.com/jsapi"> </script>
<script type="text/javascript" id="settings" agentIp="xxx.xxx.xxx.xxx" testtool="speedtest" cookieTimeInMinutes="" src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/speedtest/speedworker-post.js"> </script>
</head>
<body>
</body>
</html>

Step 2: Embed the proxy HTML page in your website pages:

<iframe src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe>

2. Download Test Images from your Server

With the JavaScript lines of the previous section, the images and scripts are downloaded from our WiFiMon Test Server, i.e. fl-5-205.unil.cloud.switch.ch, that is located in Lausanne, Switzerland. Therefore, the performance results will be relative to this server.

2.1. NetTest

For more accurate results with NetTest you may setup your WiFiMon Test Server, i.e. Apache Server to host the images and scripts, by following the steps below:

<Files ~ "\.(htm|html|css|dat|js|php|gif|jpg|png|swf)$">

Header always set Access-Control-Allow-Origin "*"

Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"

Header always set Access-Control-Max-Age "1000"

Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

</Files>

2.2. boomerang

For more accurate results with boomerang you may setup your WiFiMon Test Server, i.e. Apache Server to host the images and scripts, by following the steps below:

<Files ~ "\.(htm|html|css|dat|js|php|gif|jpg|png|swf)$">

Header always set Access-Control-Allow-Origin "*"

Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"

Header always set Access-Control-Max-Age "1000"

Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

</Files>

2.3. Speedtest/HTML5

For more accurate results with Speedtest/HTML5 you may setup your WiFiMon Test Server, i.e. Apache Server to host the images and scripts, by following the steps below:

<Files ~ "\.(htm|html|css|dat|js|php|gif|jpg|png|swf)$">

Header always set Access-Control-Allow-Origin "*"

Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"

Header always set Access-Control-Max-Age "1000"

Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

</Files>

3. Combining Measurements in the Same Page

In case you want to include all three types of testtools (NetTest, boomerang, speedtest/HTML) in the same page, inject the following HTML lines in the "head" section of your website:

<iframe src="https://fl-5-205.unil.cloud.switch.ch/wifimon/measurements/nettest.html" style="visibility: hidden;"></iframe>
<iframe src="https://fl-5-205.unil.cloud.switch.ch/wifimon/js/speedtest/speedworker.html" style="visibility: hidden;"></iframe>
<iframe src="https://fl-5-205.unil.cloud.switch.ch/wifimon/measurements/boomerang.html" style="visibility: hidden;"></iframe>

where nettest.html, speedworker.html, boomerang.html include the Javascript lines that trigger the necessary tests.