Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Java
  3. Question
Java

How to combine external javascript?

Asked by Keith Sutherland Oct 10, 2022 1.1K views 1 answer
Share

About this question

 I check my website using gtmetrix and my website is recommended for fewer HTTP requests and reduce DNS lookups. So I must to combining combining many external Javascript scripts into one

In my layout default like this

For css :

<link rel="shortcut icon" href="/content/assets/img/favicon.ico">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="/content/libs/materialize/css/materialize.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.1.6/css/swiper.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="/content/assets/style/style.min.css?v=@currentVersion">
<link rel="stylesheet" href="/content/assets/style/style-responsive.min.css?v=@currentVersion">
<link rel="stylesheet" href="/content/assets/style/custom-form-materialize.css">
<link href="/Content/dist/social-share/sharetastic.css" rel="stylesheet" />
<link rel="stylesheet" href="/content/assets/style/happy.min.css?v=@currentVersion">
For js :
  [removed][removed]
    [removed][removed]
  [removed][removed]
    [removed][removed]
    [removed][removed]
    [removed][removed]
    [removed][removed]
    [removed][removed]
   [removed][removed]
    [removed][removed]
    [removed][removed]
    [removed][removed]
    [removed][removed]

How can I combine many external Javascript scripts into one?

If combining them into one won't impact the website? Are JS and CSS websites not problematic?

Your answer

1 Answer

More Java discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Java Blogs

Guides, tips and career advice on Java from JanBask experts.