-
Notifications
You must be signed in to change notification settings - Fork 37
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
Set browser caching for static resources #278
Comments
Hi, @luboskmetko do you mean using .htaccess with mod_expiers and friends? I could do that. Let me know if I should work on that. |
Hi Marcin, yes, could be something simple like here https://varvy.com/pagespeed/leverage-browser-caching.html but I would set caching for CSS/JS for 1 year as we have files revisioning. You can also take a look at .htaccess generated by WP Rocket, they have more advanced version with more file types covered. Reassigning to you, thanks! |
Hi @luboskmetko , finally found the time to work on this. You think we should do this only for WP projects or both types? |
Hi again, I just pushed some code for the WP project only. Here's the code: https://github.com/xfiveco/generator-chisel/compare/master...marcinkrzeminski:feature-278?diff=split&expand=1&name=feature-278 I have taken most of it from https://github.com/h5bp/html5-boilerplate/blob/6.0.1/dist/.htaccess. It worked for me in the past pretty well. I did some tests on my local and the expiration time is respected as per .htaccess file. |
@marcinkrzeminski thanks and sorry for the late reply. It looks good to me, can you please create a PR? |
I just did a PR ;). |
CSS, scripts, images, etc.
The text was updated successfully, but these errors were encountered: