https://bugzilla.wikimedia.org/show_bug.cgi?id=27488
--- Comment #30 from Nux <[email protected]> 2011-04-11 20:54:50 UTC --- (In reply to comment #27) > (In reply to comment #26) > > (In reply to comment #25) > > Site JS and user JS should be at top. Users and site administrators load > > libraries in their script and they must be read at least on doc.ready and > > (as > > shown in attached test results) this will NOT be guaranteed when they are in > > the footer. > > Again, this is a solution to the immediately apparent problem, not to the > problem which actually needs to be solved. Users need to be able to > modularise > their code, load it via ResourceLoader, and indicate which modules need to be > available before rendering. But the problem is immediate at least for editors of Wikipedia and should be fixed quickly. I'm not following en.wiki but from what I'm hearing here this is a serious problem. I was following pl.wiki up to recently and there where a lot of threads about failing scripts and Gadgets and alike and no one was able to really help us. > > Also legacy JS is in fact a library that must also be ready before the page > > is > > loaded. > > On the contrary, it is usually completely useless before page rendering. It > only needs to be ready early if it is a dependency for a module which itself > needs to be ready early. Not sure what which functions do you mean, but importScript and friends work fine in head and should be available for almost all scripts. I know they will probably dropped in some future, but depreciation should occur far from dropping. > > I think you should add Mediawiki:[email protected] (or similar) so that > > scripts > > that can be moved would be moved by site administrators. > > Again, this is not taking advantage of the full power of ResourceLoader's > modularisation. Fine, but this does not exist user-side. @footer or whatever would mark script might be quicker to handle then anything in the scripts content. But from what I've seen in the code this might be not true so adding a first line comment like /* LOAD.options {isHeadScript:true, dependencies :['Mediawiki:Lib.js', 'User:Me/lib.js']} */ Problem with dependencies defined like that would be that they are not conditional, but this would be more of a problem for Bug 27771. > > This is not true - it doesn't degrade performance. It makes the page start > > appearing slower which is not the same. > > To the 99% of users who do not have extra all-singing, all-dancing JavaScript > widgets playing with their interface, slower page loading is a reduction in > performance. For readers, maybe. Don't know, they usually don't report errors with scripts. But for readers this is not really important. I don't really care when you will load search enhancement scripts and others like that. Readers should not be affected mostly because most gadgets are only on for editors anyway and are only even _loaded_ for editors. They are simply not there at all for readers until they become editors. And when they become editors this beautiful new wikieditor loads and loads and when it's ready everything changes and you don't know what happened, but you will at least loose cursor focus. BTW. Editors that don't like all-singing, all-dancing JavaScript can disable most (at pl.wiki I've always tried to allow to disable all big scripts). And this doesn't seem like a discussion for this bug anyway. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
