Will it be faster to include a javascript file and output it in html how <script>or just use the attribute srcand let the browser make another request?
<script>
src
Just outputting it instead of letting the browser make another request would clearly mean fewer requests and possibly less server load, but does it make it faster? The inclusion of files and their output do not allow the browser to cache them.
If you enable it, every other page will have the overhead of downloading the script again.
( ), . , , , JavaScript.
, JavaScript. , , , , HTTP- .
99% , , - .
. , .
: , .
: js, , , . cdn, .
( http)
, js ,
, javascript ( javascript , , javascript dom ).
, script , , -
, , : http://developer.yahoo.com/performance/rules.html
I agree with @alex. In addition, the binding allows you to load script files in parallel when analyzing the page. Most browsers use multiple streams to load content when analyzing the contents of the main page.
Source: https://habr.com/ru/post/1795376/More articles:remove numbers from the beginning of a line in a line using PHP - splitKeyboard ALT modifier cannot be overridden - javascriptEclipse: using the same output folder for different projects - javaRuby Time.strftime% P parameter not working? - ruby ββ| fooobar.comhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1795375/what-are-possible-solutions-to-implement-fulltext-search-in-azure&usg=ALkJrhiuby4GG0hNg0U5lE8hLJIcuVDbegArray of structures - cExpand ASP.net Precompiled Website - c #Domain Registration API - pythonProblem with PHP: Text explode () - splitCompression problem while saving project anR - rAll Articles