Use of SPSecurityTrimmedControl:SPSecurityTrimmed Control to load SharePoint JS for authenticated users only

I’m trying to unload SharePoint JS files, such as core.js, init.js and other unnecessary JS files in order to enhance site performance and to achieve SEO standards as well.

Currently I’m using the SPSecurityTrimmedControl tag to achieve my goal as below:

<SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationResctriction="AuthenticateUsersOnly">

    <SharePoint:ScriptLink Language="javascript" Name="core.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink Language="javascript" Name="menu.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink Language="javascript" Name="callout.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink Language="javascript" Name="sharing.js" OnDemand="true" runat="server" Localizable="false" />
    <SharePoint:ScriptLink Language="javascript" Name="suitelinks.js" OnDemand="true" runat="server" Localizable="false" /></SharePoint:SPSecurityTrimmedControl>

Problem is when an authenticated user is logged in and try to use the ribbon and click on any tab such as Page or Publish tab, it does not show the content of that tab, it keeps displaying a message “Working on it” as shown below:

enter image description here

Any help is much appreciated.