Improvements #10924
closedRemove split-script configuration property
100%
Description
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:
- A page (based on
Boot.html
orHybrid.html
) containing the JavaScript fromBoot.js
is loaded (WebResponse::ResponseType::Page
) - The JavaScript is loaded. This includes the JavaScript from
jquery.js
, andWt.js
, and all of the initial (visible) contents or the JavaScript to "upgrade" the progressive bootstrap page (WebResponse::ResponseType::Script
) - 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:
- Loading
jquery.js
andWt.js
(the skeletons) - 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.
Proposal¶
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
.
Updated by Roel Standaert about 2 years ago
- Status changed from InProgress to Review
- Assignee deleted (
Roel Standaert)
Updated by Roel Standaert about 2 years ago
- Target version changed from 4.9.0 to 4.10.0
Updated by Roel Standaert about 2 years ago
- Target version changed from 4.10.0 to 4.9.0
Updated by Korneel Dumon almost 2 years ago
- Status changed from Review to Implemented @Emweb
- Assignee changed from Korneel Dumon to Roel Standaert
Updated by Roel Standaert almost 2 years ago
- Status changed from Implemented @Emweb to Resolved
Updated by Roel Standaert almost 2 years ago
- Status changed from Resolved to Closed