A
A
alexandrnevajno12018-02-17 13:38:48
JavaScript
alexandrnevajno1, 2018-02-17 13:38:48

Ckeditor - I read someone else's code, and here this plugin is connected only on those pages where it is used. Is it better than just connecting to a site?

Hello. Reading someone else's code. And here on the pages where ckeditor is used, there is a php function that prints, in fact, the textarea itself and javascript with the connection of this plugin (and initialization).
Tell me - is it better than just specifying the connection of this script on the main page (for the entire site)? Or not?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Mashletov, 2018-02-17
@mashletov

The browser is caching. Usually, all possible scripts/styles are combined into a single minified file and included everywhere. Making dependencies on pages is an extra hassle, but it is not forbidden.

D
Denis Knyazev, 2018-02-17
@axaxa_man

It is logical to use the script only where it is used, because otherwise it is extra traffic, an extra request, the client will wait longer for the page to load, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question