Fix for #2384 and caching enabled with modifyVars set #2735
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This came up for me on a project where there are "cobranded" versions of the same site. I decided to try rendering the cobranding CSS in the browser, which is when I discovered cache was automatically turned off if modifyVars were set at all. So, I added caching with custom vars.
I also wanted the page rendering to be blocked until styles were done, but was having the same issue as #2384. Since "sync" rendering took 7-8 seconds and "async" rendering took about half a second, I decided to fix this. Not sure if docs should be updated to reflect that XHR is always async. What's nice about this is that the default value should make everything a zillion times faster for people using Less in the browser.