Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • lori ryan 199 posts 529 karma points
    Aug 25, 2020 @ 17:32
    lori ryan
    0

    Client dependency optimisation - Enable text compression

    Just wondering although I have the client dependency enabled and I see the js has been bundled when I run through gtmetrix or google lighthouse tool I get Enable text compression on the Js files. Is there anything I can do??

    should axd be added in the ouput caching headers in iis?

  • Yakov Lebski 427 posts 1654 karma points
    Aug 26, 2020 @ 03:03
    Yakov Lebski
    1

    please check what Dynamic and static compression installed and enabled on IIS

  • lori ryan 199 posts 529 karma points
    Aug 26, 2020 @ 21:27
    lori ryan
    0

    We got gzip installed

  • Yakov Lebski 427 posts 1654 karma points
    Aug 27, 2020 @ 00:10
    Yakov Lebski
    0

    Be sure what it aslo enabled, may be it external files?

  • lori ryan 199 posts 529 karma points
    Aug 27, 2020 @ 08:08
    lori ryan
    0

    Hi Yakov Many thanks for coming back to me - how can I check that?

  • lori ryan 199 posts 529 karma points
    Aug 27, 2020 @ 12:04
    lori ryan
    0

    Also Yakov with the client dependency is there anyway to make sure that when necessary javascript files are added on they are added on to the bottom rather than the top of the required js.

    So say on my master page I have

    Html.RequiresJs("/vendor/jquery/jquery-3.5.1.min.js");
    

    and on one of my grid editors I have

    Html.RequiresJs("/Scripts/footerSliderTwoCol.js");
    

    I am finding that the /Scripts/footerSliderTwoCol.js is getting added above the jquery causing it not to fire.

    The only thing I can think of is to include the master files as normal using

    <script src="/vendor/jquery/jquery-3.5.1.min.js"></script>

    and using Html.RequiresJs("/Scripts/footerSliderTwoCol.js");

    everywhere else.

  • Yakov Lebski 427 posts 1654 karma points
    Aug 27, 2020 @ 15:34
    Yakov Lebski
    1

    Check what both enabled enter image description here

    enter image description here

  • Yakov Lebski 427 posts 1654 karma points
    Aug 27, 2020 @ 15:36
    Yakov Lebski
    1

    You can add priority to your script registration

           Html.RequiresJs("/scripts/jquery.js", 1);
    

    this script will be first

        Html.RequiresJs("/scripts/script.js", 100);
    

    this will be after

  • lori ryan 199 posts 529 karma points
    Aug 27, 2020 @ 16:02
    lori ryan
    0

    thanks just found that

  • lori ryan 199 posts 529 karma points
    Aug 27, 2020 @ 16:02
    lori ryan
    0

    on the server I cant enable dynamic is greyed out so I dig a little deeper thanks so much for the help

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies