-
Notifications
You must be signed in to change notification settings - Fork 18
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
[Feature] Cache static files, prevent caching dynamic contents #2
Comments
Thanks for your suggestions! I had thought about this topic before and what do you think about this:
|
I find out avery good configuration from https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess
|
I aggree that there could be more options. Because that has nothing to do with caching, I created a new issue: #3 I think the caching issue could be too complex, because each Angular app probably needs another catching strategy. There is a notice over the boilerplate you have posted:
The browser-caching problem affects all files that are not created by angular and are not named with a hash string (only in prod mode). My apps I created until now were affected with this problem because I had to load some files via XHR requests from the assets folder (e.g. JSON files or Javascript). In order to set the expiration values properly you have to know exactly what kind of files will change, how often will it be changed and how important is it that the correct file is loaded on client side. But this creates a problem: It depends on the app. Perhaps it's possible to create an option to define expiration rules in the generator...🤔 |
Hey I though it could be usefull to turn on production mode:
The text was updated successfully, but these errors were encountered: