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

    (@futtta)

    ESSB (a stats thing?) seems to add nonce’s and the postid to the HTML, so you might want to exclude “essb_stat_data”.

    Thread Starter Wanderlusters

    (@wanderlusters)

    Hi futtta,

    That does seem to have helped with JS on the homepage but posts are still generating multiple JS/CSS files as is CSS on the homepage.

    Would it help if I uploaded the JS/CSS files?

    Thanks very much for helping with this.

    Plugin Author Frank Goossens

    (@futtta)

    Hmmm … I compared the CSS of 2 pages and the difference was

    .dttTKKZF{display:none !important;visibility:hidden}
    .hOlfRb{display:none !important;visibility:hidden}

    vs

    .JjeAIXrGz{display:none !important;visibility:hidden}
    .AQTrXGmz{display:none !important;visibility:hidden}

    The fact that you have random selectors in there means that no 2 pages can share the same aggregated CSS-file. So you’ll have to find a way to exclude these (maybe they are in one file being that is served by a plugin).

    I’ll take a look at JS as well.

    Plugin Author Frank Goossens

    (@futtta)

    So, as far as JS is concerned, these were the offenders;

    function essb_window562921788(oUrl,oService){window.open(oUrl,"essb_share_window","height=300,width=550,resizable=1");

    vs

    function essb_window2008318077(oUrl,oService){window.open(oUrl,"essb_share_window","height=300,width=550,resizable=1");

    and

    var cbParentOffset=$(this).parent().offset(),nonce=$('input#voting_nonce').val(),cb_data_votes={action:'cb_vote_counter',nonce:nonce,postid:'7163'},cb_data_score={action:'cb_add_user_score',nonce:nonce,cbCurrentVotes:parseInt(cbVoteAmount),cbNewScore:cbFinalX,postid:'7163'};

    vs

    var cbParentOffset=$(this).parent().offset(),nonce=$('input#voting_nonce').val(),cb_data_votes={action:'cb_vote_counter',nonce:nonce,postid:'5468'},cb_data_score={action:'cb_add_user_score',nonce:nonce,cbCurrentVotes:parseInt(cbVoteAmount),cbNewScore:cbFinalX,postid:'5468'};

    and

    if(!cb_checker){var cb_rating_c='7163';
    }else{var cb_rating_c=cb_checker+',7163';
    }

    vs

    if(!cb_checker){var cb_rating_c='5468';
    }else{var cb_rating_c=cb_checker+',5468';
    }

    What you now have to do is figure out where this code originates. If it is in one (or more) files, you’ll have to exclude the file. If the code is inline, in the HTML, you can exclude using a string (e.g. “cb_rating_c”).

    Hope this helps,
    frank

    Thread Starter Wanderlusters

    (@wanderlusters)

    That’s great info, thank you.

    I think the unique CSS elements are coming from Wanguard plugin (wanguard-core.php). What is the best way to exclude that CSS? I have attempted to append noptimize tags to that specific html/css section in the php but I don’t think it’s working.

    The JS bits I will have to work on to try and figure out where they are coming from.

    Plugin Author Frank Goossens

    (@futtta)

    hmm, the problem is that the IE-hacks aren’t excluded (which they should). could you in wangguard-admin.php replace

    <![if !IE]> with <!--[if !IE]-->
    and
    <![endif]> with <!--[endif]-->

    and see if that excludes the random CSS from being aggregated?

    More info on conditional comments is at https://www.quirksmode.org/css/condcom.html

    Thread Starter Wanderlusters

    (@wanderlusters)

    Sorry I meant wangguard-admin.php – Ok I’ve tried that change but still getting a lot of CSS cache files generated. I don’t think they are being created on every refresh like before but every post/page still has unqiue CSS.

    I’m having difficulty comparing the different files that are created as the changes are always on the same line. What program do you use to compare?

    I’ve zipped a few up after refreshing the home page and a couple of posts if that helps: https://wanderlusters.com/css.zip

    Plugin Author Frank Goossens

    (@futtta)

    I use notepad++. Comparing can be a pain, unless you replace “;” by “;\n” (with “regular expression” enabled in search/replace) to introduce a linebreak after every semi-colon. if you run compare (under plugins in notepad++) then all will become clear.

    BTW; I just wrote a blogpost explaining why and how to keep cache size under control (based a.o. on what we discussed in this here thread).

    Thread Starter Wanderlusters

    (@wanderlusters)

    Ok I’ll give that a go, thank you.

    Plugin Author Frank Goossens

    (@futtta)

    on a side note; you might also want to tell the Wanguard-people that their conditional comments are in fact not comments and a such should be fixed ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Huge cache size – unable to find culprits’ is closed to new replies.