You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/spa-improvements.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ Adding a "SPA mode" in the RUM Settings UI would be the easiest way to simplify
6
6
7
7
Adding more methods to the `LUX` API is a middle-ground kind of solution that gives implementers more control but does not significantly reduce complexity.
8
8
9
+
Both solutions require updates to the inline snippet. If customers try to use the new `LUX` methods with the old snippet, there is a risk of JavaScript errors and app crashes.
10
+
9
11
We should aspire to completely automate SPA implementations, possibly with the help of Chromium's soft navigation work, but mostly aiming for a generic cross-browser solution. This would be a large undertaking and require a lot of testing and validation with customers.
10
12
11
13
## The problem (high level)
@@ -14,7 +16,7 @@ We should aspire to completely automate SPA implementations, possibly with the h
14
16
15
17
Much of the internal lux.js architecture is designed around full page navigations. SPA support was an afterthought, and setting `LUX.auto = false` essentially puts lux.js into "full manual control" mode.
16
18
17
-
A proper lux.js implementation in a SPA requires correctly use of `LUX.auto`, `LUX.sendBeaconOnPageHidden`, `LUX.init()`, `LUX.markLoadTime()`, and `LUX.send()`. Getting just one of these wrong can throw the whole implementation off.
19
+
A proper lux.js implementation in a SPA requires correct use of `LUX.auto`, `LUX.sendBeaconOnPageHidden`, `LUX.init()`, `LUX.markLoadTime()`, and `LUX.send()`. Getting just one of these wrong can throw the whole implementation off.
18
20
19
21
### Many implementations seem to be incorrect, resulting in lost data and mistrust in SpeedCurve's metrics
20
22
@@ -62,6 +64,7 @@ Once a lux.js implementation is deployed, it is difficult to get customers to ch
62
64
### Cons
63
65
64
66
- Requires a new API method.
67
+
- Requires an inline snippet update. Implementers using the old snippet may have JS errors.
65
68
- Implementers are forced to choose one extreme or the other: full manual control (`LUX.auto = false`) or full autopilot.
66
69
- Does not fix the fundamental issues with lux.js architecture.
67
70
@@ -139,6 +142,7 @@ This solution would also get rid of the Page Load metric for soft navigations (u
139
142
140
143
- Does not allow for per-account implementation tweaks.
141
144
- Adds at least 3 new methods to the `LUX` API, increasing risk of redundancy or deprecation.
145
+
- Requires an inline snippet update. Implementers using the old snippet may have JS errors.
142
146
- Some risk of misconfiguration if `LUX.enableSPAMode()` is not called at the correct time.
0 commit comments