Remove JQuery

Dong Bui asked on June 22, 2022 10:40

Hello guys,

We using Kentico 13 with ASP.NET Core solution, It's possible to not using JQuery with Page Builder ?

These file render on page and we just want to remove this

  • _content/Kentico.Content.Web.Rcl/Scripts/jquery-3.5.1.js
  • _content/Kentico.Content.Web.Rcl/Scripts/jquery.unobtrusive-ajax.js

Thanks,

Recent Answers


Liam Goldfinch answered on June 22, 2022 11:50

You need those for the pagebuilder while in the administration site, but you can make it so they don't render on the presentation website by wrapping in a conditional if statement such as:

@if (Context.Kentico().PageBuilder().EditMode)
{
    <page-builder-scripts />
}
1 votesVote for this answer Mark as a Correct answer

Sean Wright answered on June 23, 2022 14:55

I'd recommend using the Xperience Page Builder Tag Helpers to conditionally show content based on the page builder mode of the there request.

You can also conditionally included the Page Builder Styles Tag Helper since you don't need these on the live site.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.