OK, so add_filter(‘autoptimize_filter_cache_create_static_gzip’,’__return_true’); is there to create static gzip files, how those are to be served by the webserver is up to the webserver config and is different between webserver version (Apache, IIS, nginx, …).
Normally you just want the webserver to do the gzipping “on the fly”. for this purpose AO adds a .htaccess file which gently asks Apache (but not other webservers) to do the gzipping and set expiry for the autoptimized files, but Apache (depending on config and higher up .htaccess files) can still choose not to honor AO’s .htaccess. In most cases deactivating the “serve as static files”-option fixes this (but there’s a known issue with WP Super Cache’s .htaccess which sets expiry to 3, if you have that you might want to change that).
AO by default moves inline CSS to the autoptimized CSS-file, but does _not_ do so for inline JS as that risks causing a big number of files in the Autoptimize cache (and more important but less visible issues). Even if “also aggregate inline JS” is on, some of it will be excluded anyhow (e.g. JS containing nonce’s or document.write or google ads JS or …).
Lastly; not sure what you are referring to with jscript.js I’m afraid, can you clarify?
frank
Hi,
ok, then I need to try with non-static option as I have Apache and over code is served as gzip. Do you recommend any additional cache plugin as W3TC seems to have issues as well as Super Cache?
Also by optimizing my inline code to outsourced code I tried your aggregate function, by default with CSS but also then by activating JS GTMetrix still stated to me, that there is inline CSS and inline JS left? So for JS you stated, it can be, but for CSS I thought it will work?
jscript.js is per default excluded on your side, so I tried to remove exclusion and worked well. However, in your FAQ here on the plugin page (first page of your plugin description) you write in your FAQ why to exclude jscript.js as “popular plugins” will get use of and will then get in trouble, but you don’t state anywhere, which plugins there are.
Regards,
Christian
I use WP Super Cache myself, have encountered no issues except for the short expiry mishap in their .htaccess. Alternative could be KeyCDN Cache enabler maybe?
So for JS you stated, it can be, but for CSS I thought it will work?
No idea, but if you can share your URL I can have a quick look.
jscript.js is per default excluded on your side, so I tried to remove exclusion and worked well. However, in your FAQ here on the plugin page (first page of your plugin description) you write in your FAQ why to exclude jscript.js as “popular plugins” will get use of and will then get in trouble, but you don’t state anywhere, which plugins there are.
ah, jquery.js. well, don’t have a list of those, but if you removed jquery.js from the exclusion list, tested and all works well, then you can safely leave it be 🙂
Is this expiry mishap what I also mentioned for the images? So is it a bug, which should be filed for their plugin?
http://www.heutger.net is the URL, however, I switched back to W3TC currently.
Ok, looked like you had played around a bit with some plugins and have an experience list, for sure, you won’t be able to provide a full list of all plugins which may arise problems. 😉
Is this expiry mishap what I also mentioned for the images?
don’t think so, but not 100% sure
Ok, looked like you had played around a bit with some plugins and have an experience list,
don’t have lists, plugins can change overnight so a list would require updating which would require testing which would require time which … I don’t have 😉