there’s info in the FAQ on that specific topic muehlwitz.
the (almost) one-liner summary:
you have page- specific JS resulting in no 2 pages having the same JS, breaking the caching. exclude that from aggregation and you’ll be all right.
hope this helps,
frank
Hi Frank,
thanks for answering so fast. After comparing two Cache Files you are right, the Plugin “WordPress Popular Posts” creates inline JavaScript that is different on each page. Though – for the Moment i see no Option / a way to exclude Inline JavaScript, only Full Scripts !?
Guido
Just found out that i can remove Inline JavaScript via Action Name, the german Translation does not refer to this
indeed; suppose you have
<script>so="etwas";</script>
then you can simply add etwas to the comma-seperated list of JS exclusion.
Kind regards,
frank
Had to remove 3 Inline Skripts, tested it with several Pages which results in onle ony Cache-File. Thanks for Helping!
the plugin is using loads of space on my host in
wp-admin–> wp-content–> autooptimize –> js 100 mb
and it increases daily . is this normal or something need to be done
i am no tech — and icant understand what you guys posted above. can you provider a solution
the easy explanation: you have a plugin which inserts ever-changing JS, which means AO can’t re-use an already cached optimized JS-file so it will keep on recreating new optimized JS-files.
the easiest solution: add this to your theme’s functions.php (make a backup of that file first, if you’re not comfortable doing this find someone who can assist, errors can break your site entirely):
add_filter('autoptimize_js_include_inline','funkychd_ao_js_include_inline',10,1);
function funkychd_ao_js_include_inline() {
return false;
}
this will tell AO not to aggregate any JavaScript in the HTML (which typically is where such ever-changing JS is injected).
hope this helps,
frank
got it , thanks , should i add these lines towards the end or any specific point .
at the end would be fine π