Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #2384 and caching enabled with modifyVars set #2735

Merged
merged 3 commits into from
Jan 26, 2016

Conversation

matthew-dean
Copy link
Member

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.

…tyles are done

/ The actual XHR requests are changed to async for a speed boost for "sync" loading of orders of magnitude
- Basically, compares assigned vars to vars in localStorage. If they match (and all the other cache criteria pass), then loads from cache
@matthew-dean
Copy link
Member Author

Any comments on this? Any reason not to merge it?

matthew-dean added a commit that referenced this pull request Jan 26, 2016
Fix for #2384 and caching enabled with modifyVars set
@matthew-dean matthew-dean merged commit 809f1b1 into master Jan 26, 2016
@seven-phases-max seven-phases-max deleted the browser-cache branch May 31, 2017 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant