Expert mode conflicts with autoptimize
Impacted plugin
Super Cache
Quick summary
See this article: https://gregsullivan.com/wordpress/autoptimize-wp-super-cache-conflict/
This seems to be still the case now. Could this be fixed?
Steps to reproduce
- Install WordPress on an Apache server.
- Install and activate WP Super Cache and Autoptimize.
- Set Autoptimize to aggregate JavaScript and css.
- Turn on WP Super Cache and set its delivery method to Expert.
WP Super Cache’s Expert delivery method uses mod_rewrite instead of php to serve files, so the plugin generates a .htaccess file when that delivery method is activated. Inside the file is this line:
Header set Cache-Control 'max-age=3, must-revalidate' Applied to all files in the cache directory’s subdirectories, it reduces cache time to three seconds. (So if you’re refreshing very quickly, cached versions of your Autoptimize files might be served by your browser the first one or two times before requiring another trip to the server for validation.)
A clear and concise description of what you expected to happen.
Autoptimize files not to be affected.
What actually happened
No response
Impact
Some (< 50%)
Available workarounds?
Yes, difficult to implement
Platform (Simple and/or Atomic)
No response
Logs or notes
No response
It could be fixed by moving the .htaccess file to the cache/supercache directory, but Page Optimize has a workaround, so I'm inclined to say we leave it as-is. Anyone else?