Project

General

Profile

Actions

Improvements #10924

closed

Remove split-script configuration property

Added by Roel Standaert about 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roel Standaert
Target version:
Start date:
09/08/2022
Due date:
% Done:

100%

Estimated time:

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:

  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.

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.

Actions #1

Updated by Roel Standaert about 2 years ago

  • Status changed from InProgress to Review
  • Assignee deleted (Roel Standaert)
Actions #2

Updated by Roel Standaert about 2 years ago

  • Description updated (diff)
Actions #3

Updated by Roel Standaert about 2 years ago

  • Assignee set to Korneel Dumon
Actions #4

Updated by Roel Standaert about 2 years ago

  • Target version changed from 4.9.0 to 4.10.0
Actions #5

Updated by Roel Standaert about 2 years ago

  • Target version changed from 4.10.0 to 4.9.0
Actions #6

Updated by Korneel Dumon almost 2 years ago

  • Status changed from Review to Implemented @Emweb
  • Assignee changed from Korneel Dumon to Roel Standaert
Actions #7

Updated by Roel Standaert almost 2 years ago

  • % Done changed from 0 to 100
Actions #8

Updated by Roel Standaert almost 2 years ago

  • Status changed from Implemented @Emweb to Resolved
Actions #9

Updated by Roel Standaert almost 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF