Improvements #10924

Remove split-script configuration property

Added by Roel Standaert 3 months ago. Updated about 2 months ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


The split-script feature isn't documented anywhere, and it doesn't seem to be entirely correct anyway?

This feature is only active when both progressive-bootstrap and split-script are enabled.

What this feature appears to do

When a normal (not WidgetSet, nor plain HTML) session bootstraps, it follows this pattern:

  1. A page (based on Boot.html or Hybrid.html) containing the JavaScript from Boot.js is loaded (WebResponse::ResponseType::Page)
  2. The JavaScript is loaded. This includes the JavaScript from jquery.js, and Wt.js, and all of the initial (visible) contents or the JavaScript to "upgrade" the progressive bootstrap page (WebResponse::ResponseType::Script)
  3. A JavaScript update request is sent with the load signal (WebResponse::ResponseType::Update)

When split-script is enabled, the second step is split up into:

  1. Loading jquery.js and Wt.js (the skeletons)
  2. Upgrading the progressive bootstrap page (the rest)

This seems to be some attempt at caching part of the loaded script since for the first part (the skeletons) the Cache-Control header is added:

Cache-Control: max-age=2592000,private

Problems with this feature

When the feature is enabled it doesn't appear to break anything, but the cache is always defeated by the fact that the request contains the session id and script id as parameters, which are randomly generated for every session.


Since I fail to see the benefit, and the feature was never actually advertised anyway (it was never mentioned in release notes or any documentation), I propose we purge it from Wt's source code altogether, which nicely simplifies WebRenderer.C and Boot.js.

Also available in: Atom PDF