You can edit “.htaccess” file, to set CSS cache time for browsers, or you can disable cache entirely. It is generally not recommended to close the cache, as this may have a serious impact on site's loading experience.
How to configure
Edit “.htaccess” file, and add the following text at the end of file.
Various expiry times can be set, depending on the specific needs, for each website document type. If certain types of files are updated frequently (e.g. CSS files), they can be set to expire at shorter times.
When setting browser cache time, please note:
1. Establish caches for all static resources whenever possible,
2. Configure the expiration time to at least one month (recommended setting is to add one year since the visit time),
3. Don't set the cache to more than a year in advance.
- When setting the browser cache time, if certain files are set too long, users may not be able to navigate to the latest version of the website page, after it has been updated.
- If you're making changes to your website design, you may not be able to see those changes, despite the site being modified, due to browser keeping cache files for too long.