[eluser]Josh Giese[/eluser]
[quote author="shobekhan" date="1199831484"]If I keep the javascript code in external js or style sheet in css file the website runs much slow rather than it being included in a views.
[/quote]
The overall page weight would be the same if the files was included in the view, or called externally.
the only slow down that I would think would come from having to open several connection to download each js file, and css file. This speed difference would be so small that I doubt that it would really be noticeable.
The better point is for maintanability and code reuse ability. Separate files are the way to go.
What if you have one JS function you need on several views. if you update that function you have to update each view. if it is external, you update one JS file.
I say separate files are the way it should be done. Much cleaner.