-
Notifications
You must be signed in to change notification settings - Fork 67
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
Wiki on actual things you can do/read? #46
Comments
A very brief overview is that when the server sends a file it can include an Expires and/or Cache-Control header, which tells the browser when it needs to refresh that content. Until that time passes, the browser can choose to use the cached copy of the file. At BMFW I use Apache's mod_expires to set a +1 week expiration on the content via .htaccess. The nuts and bolts of it is usually you want to provide a separate CSS file and let browsers cache that. Some people argue that in-lining your important CSS in your pages helps browsers do initial rendering faster since it doesn't have to do an extra fetch. My response to that is if web pages weren't obscenely large to begin with the paint issues would be totally negligible. But, I'll admit that over poor network connections, extra fetches can perform badly. I prefer to keep it very simple and just keep the CSS separate. IMO the best way to help people with bad connections is to keep page + resource weight as small as possible. |
Caching. I have minimal idea on how it works.
Is a CSS file for only the things needed on each page or a common CSS file better? Does the CSS file get downloaded every time?
The text was updated successfully, but these errors were encountered: