R
R
RushV2021-07-14 20:38:14
css
RushV, 2021-07-14 20:38:14

What's the best way to add styles?

I welcome everyone!
What is the best way to include third-party styles?
That's better:

<link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  />

Or like this:
<link href="/css/animate.min.css" rel="stylesheet">

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya, 2021-07-14
@rpsv

Option 1: include third-party styles that do not lie with you locally
Option 2: include local styles that are on the same server.
The formulation of the question is clearly lame, but in general it is better to store everything in one basket (locally), because CDN is certainly good, but there will be no profit from this if you have jQuery (for example) with the speed of a bullet will return (also from the browser cache), and the rest of the scripts will be slowly but surely loaded from your server.
In short, why you need a CDN for JS/CSS libraries is not clear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question