5.x Performance Boost w/code

Derek1244

New Member
YetiShare User
YetiShare Supporter
Jul 17, 2020
11
3
3
Recently spent some time try looking at ways to improve page load time. Identified an easy win that cuts the page load time in half for files that are shared (Unlogged In Visitors). Since visitors viewing a shared file dont have the ability to upload (Without Modification) it makes no sense to load uploader.js

Code:
sudo vi /var/www/html/themes/spirit/views/account/partial/layout_logged_in.html.twig
(Line 94 on Version 5.3.1)

        {% if Auth.loggedIn() == 'true' %}
        <script type="text/javascript" src="{{ CORE_SITE_PATH }}/assets/js/uploader.js?r={{ date().timestamp }}"></script>
        {% endif %};
Hope this helps and is made part of the mainline package. Cheers.

This did increase performance however it prevented Visitors from using the "Download" button.
 
Last edited: