سؤال

I was wondering if I have a JavaScript plugin, for example, of about 50Kb, does if I comment that out but I load the file anyway in the page, will be weight 50Kb to server side and browser side?

I mean 50kb of JavaScript, commented out at all, but loaded anyway, will afflict the page load performance as well as if it is not commented?

هل كانت مفيدة؟

المحلول

The browser will render the page faster, but obviously it won't make any difference for the server. The JavaScript, commented out or not, will still have to be downloaded.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top