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

Add Expires headers #174

Open
XhmikosR opened this issue Mar 23, 2016 · 10 comments
Open

Add Expires headers #174

XhmikosR opened this issue Mar 23, 2016 · 10 comments

Comments

@XhmikosR
Copy link
Member

Maybe also remove ETag while at it.

@XhmikosR
Copy link
Member Author

@vladikoff: I have a couple more suggestions for the server. Can you CC whoever is in charge of maintaining the server?

@XhmikosR
Copy link
Member Author

Also add cache busting for static files.

@XhmikosR
Copy link
Member Author

/CC @aulvi for cache busting. Then we can increase the expires date and remove ETags.

@aulvi
Copy link
Member

aulvi commented Feb 20, 2017

@XhmikosR How can I help?

@XhmikosR
Copy link
Member Author

XhmikosR commented Feb 20, 2017 via email

@XhmikosR
Copy link
Member Author

@aulvi: As you can see from https://gtmetrix.com/compare/qKtQlfmm/JQKDpMBV, that is why we need expires date. Currently each static file is being served from our server because it doesn't have any cache header. The https change helped a bit due to http/2 but still it's slow as you can see.

@aulvi
Copy link
Member

aulvi commented Mar 21, 2017

@XhmikosR Current nginx config simply acts as a reverse proxy to the node app.

Would it be possible for the node app to set the headers and manage the cache busting?

@XhmikosR
Copy link
Member Author

@aulvi: I tried doing this on the Grunt side in https://github.com/gruntjs/gruntjs.com/compare/grunt-usemin

But it has some issues. If we could sort that out, we could just set the headers in Express.js.

Alternatively, we could add cache busting in Express.js but I'd rather do it in preprocess step.

@XhmikosR
Copy link
Member Author

@aulvi: have you changed something on the nginx side to automatically add caste busting?

I see the static assets have a random hash appended to their filename, but Cloudflare doesn't cache them at all.

So, can you explain a little bit what is happening and if the main site is still being built from the master branch?

Thanks.

@XhmikosR
Copy link
Member Author

Scratch my previous comment; I had accidentally sneaked in my grunt-usemin changes in master. Cleaned up the patches and forced pushed and made a new tag.

So this issue is still valid. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants