Handling New Versions

Maple WWW Documentation

The behaviour

- When a user opens your worksheet at the first time, the browser loads and caches maple-www.js as any other JavaScript file.
- Next time, when the user opens any of your worksheets, the browser does not load maple-www.js again. It uses cached version.

The problem

If you update maple-www.js on your server, the user should open your worksheet and press Refresh Button (F5) in the browser to get the new version of Maple WWW. Otherwise, the user will use the old version of maple-www.js.

Since your worksheets can be viewed by any user in the internet, you can not notify all users about the update.

The solutions

There are two main methods on how to solve this and allow your users to update Maple WWW smoothly:
Caching Headers
Configure your server to set Expires or Cache-Control: max-age headers for maple-www.js.
So, after the specified amount of time, maple-www.js will be automatically updated when a user opens the worksheet.
Fingerprinting
Fingerprinting allows the browser to cache maple-www.js until it changes on the server and then automatically update it.
You can accomplish this by embedding a fingerprint in the URL of maple-www.js.
For example: change maple-www-1.0.0.js to maple-www-1.1.0.js
Since maple-www.js is automatically added to the worksheets on your server, we recommend to use Fingerprinting method to update Maple WWW.