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

Force html templates to reload when development mode is enabled #8019

Merged
merged 1 commit into from May 29, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented May 29, 2015

Depending on server configuration or browser some angular templates are sometimes not reloaded because the cacheBuster only changes if also a JS file changes.

This PR will create a random cache buster if development is enabled. The cache buster is for example used like this: https://github.com/piwik/piwik/blob/2.14.0-b1/plugins/MultiSites/angularjs/site/site.directive.js#L38

Disadvantage of this solution is that templates will be always reloaded even if a cached version (browser cache) could be used when development is enabled

@tsteur tsteur added the Needs Review PRs that need a code review label May 29, 2015
@mnapoli
Copy link
Contributor

mnapoli commented May 29, 2015

Can confirm it works 👍

mnapoli added a commit that referenced this pull request May 29, 2015
Force html templates to reload when development mode is enabled
@mnapoli mnapoli merged commit 4470a38 into master May 29, 2015
@mnapoli mnapoli deleted the force_template_reload branch May 29, 2015 19:41
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants