Charts not rendered when Startup.CSS enabled due to cloaking
Summary
Refers to this discussion in #235497 (closed) and it's caused by !39115 (merged)
Consistently reproducible with Chrome and Edge, less with Firefox and Safari (Safari is still a mystery to me).
Steps to reproduce
Steps to reproduce:
- Visit this page with cached assets and
startup_css
cookie tofalse
(or not set) - set the
startup_css
cookie totrue
- refresh (with
Disable Cache
checked) or Hard-refresh - the charts are not showing
Note that a normal refresh (or refreshing with Disable Cache
unchecked will show the page correctly).
Example Project
Can be tested on staging or locally (prod is now startup.css disabled).
What is the current bug behavior?
As shown in the videos, the charts are not rendered.
Chrome | Edge |
---|---|
charts_startup_chrome_480 | charts_startup_edge_480 |
Firefox | Safari |
---|---|
charts_startup_firefox_480 | charts_startup_safari_480 |
What is the expected correct behavior?
The charts should be rendered
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)