javascript - Is it considered bad practice or unethical to append always used small jQuery plugins to the end of a common.js file? -
Many of my jQuery projects use sub menus because of the user's cause (and the events caused by the user due to the accident To stop) I strongly believe in using the plugin on the origin of jQuery.
Because this plugin is used on every page of my site, and because it has only been reduced to 8 lines, I will end it with my common.js
file I add to that, which is included on every page I have retained the authors.
The advantage of this is a low HTTP request, for one it is also common for each page, so it does not need to control the cache separately.
But , is this a good practice? Am I immoral to the original developer, lumping at the end of his code?
Do all third party plugins remain in their JS files, and I should leave something like
thanks
Unless you are keeping the license (where possible, where the plugin can be found), nothing is wrong in it ... any plugin writer Should be okay with this in my opinion because it is a purely technical decision.
By combining, you are greatly reducing HTTP traffic to the user, which results in a better user experience ... the benefits are very clear here, and if the following are included, I think You are safe and ethical:
- The license is complete and complete (as it was in the original plugin)
- You are following that license
- Add the URL where it came from the plugin if it is not in th Was the original IMO
If it helps, then I personally do exactly what you are asking for, all the various plugins jquery.plugins.misc.js
In my project the file that is mined with the rest, large plugins are themselves ... but both of them are locked in the same large file, which will be compressed with the closed license by the closing compiler And, if possible, plugins.
Comments
Post a Comment