Plugin Contributor
iSaumya
(@isaumya)
You said the opposite actually. The cache control section that you have in the plugin settings that is only for HTML pages. Whereas if you enable the option for adding browser cache rule for static files in the plugin settings it will add max-age of 604800 for CSS/JS as these files gets updated often and then for others it’s actually 1 year.
Thread Starter
longzg
(@longzg)
Thank you, I don’t know where the problem is, nor how to configure it
Plugin Contributor
iSaumya
(@isaumya)
Can you please tell me what is your problem exactly? If possible please provide screen recording or screenshots.
Thread Starter
longzg
(@longzg)
The configuration of my plug-in super page cache for cloudflare is:
Browser Cache-Control max-age: 60
Cloudflare Cache-Control max-age:2592000
But, some files such as CSS and JS have cache control: max-age = 315360000, while some files such as PNG and SVG have cache control: max-age = 604800
I don’t know how to set this configuration max-age!I don’t know how this data 315360000 came from
Plugin Contributor
iSaumya
(@isaumya)
The configuration of my plug-in super page cache for Cloudflare is:
Browser Cache-Control max-age: 60
Cloudflare Cache-Control max-age:2592000
– First of all, changing the default values is not recommended unless you absolutely know exactly what you are doing.
Now coming to the CSS/JS file or any other static files, that number does not affect anything for the static files. Instead, if you enable the Add browser caching rules for static assets section inside the plugin (screenshot: https://i.imgur.com/Z4JvpNX.jpeg) then it will add the browser caching rules in your .htaccess file within which you can check the rules.
But, some files such as CSS and JS have cache control: max-age = 315360000, while some files such as PNG and SVG have cache control: max-age = 604800
– It might be possible that you might have some conflicting rules in your htaccess file. When enabling the Add browser caching rules for static assets option inside the plugin please make sure that no other existing rules are there that might be modifying the caching behaviour of static files.
Thread Starter
longzg
(@longzg)
First of all, thank you very much for your help. The configuration ‘Add browser caching rules for static assets’ has not been modified. It is currently in no status. In addition, my site is hosted on WordPress, we have not added or changed this htaccess
Plugin Contributor
iSaumya
(@isaumya)
First of all you haven’t shared your site URL so I can’t check what cache control header is being set for static files. Moreover if the option for Add browser caching rules for static asset is set to NO then those cache control rules are not being added by this plugin. Check the .htaccess file of your site, maybe they are being added by the hosting company.