• Resolved muehlwitz

    (@muehlwitz)


    I have to delete all Files in /wp-content/cache/autoptimize/js manually every week. At the Moment the Directory contains 15.000 Files / 3GB. The CSS dir only Contains ~100 Files. This results in a not Working WordPress because the Quota is exceeded. What is wrong?

    https://ww.wp.xz.cn/plugins/autoptimize/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Frank Goossens

    (@futtta)

    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

    Thread Starter muehlwitz

    (@muehlwitz)

    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

    Thread Starter muehlwitz

    (@muehlwitz)

    Just found out that i can remove Inline JavaScript via Action Name, the german Translation does not refer to this

    Plugin Author Frank Goossens

    (@futtta)

    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

    Thread Starter muehlwitz

    (@muehlwitz)

    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

    Plugin Author Frank Goossens

    (@futtta)

    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 .

    Plugin Author Frank Goossens

    (@futtta)

    at the end would be fine πŸ™‚

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘No Garbage Collection for JavaScript Cache Files’ is closed to new replies.