https://bugzilla.wikimedia.org/show_bug.cgi?id=27488
--- Comment #33 from Roan Kattouw <[email protected]> 2011-04-12 18:38:35 UTC --- (In reply to comment #32) > This again is not exactly true. I do need to insert the link as soon as the > page is ready, BUT I also need to do it as soon as possible which is the whole > idea behind using $(document).ready instead of body.onload (and such). > Offhand I don't think there's such a large difference between document ready in the head and document ready at the bottom provided there isn't a lot of JS immediately before your document ready call; this was the case previously with the startup module, jQuery and the mediaWiki module loading at the bottom before other things, but that's no longer the case with the new code. I'll test what the actual difference in speed is in these three scenarios. > The problem is if the scripts are loaded at the bottom of the page then the > page appears faster, BUT overall load time is still the same or (due to more > complicated loading scripts) even a bit slower. > Overall load time should be faster because, as Timo said, scripts in the head block everything else happening in parallel. > And so it seems you have no plans to fix issues described e.g. in comment #28. > Because the script will still have to wait for the page to load, then for > other > scripts to load then to add a link to a page that appeared to be ready for few > seconds. > We haven't decided against it yet, but we also haven't decided in favor of it. I want to test and see what the actual difference is before a decision is made. > Though I like LiquidThreads I'm not sure why it should have greater rights > then > scripts developed by native developers. This is sysop which have more inside > knowledge of what is needed for the users. Nobody said that local scripts should have greater rights than LQT. All Happy-melon said is that putting scripts in the head is not really want you want, IF what you really want is make sure certain libraries will be available when it loads. In that case, RL's dependency mechanism should be used (dependencies for client-side scripts aren't really supported yet, but we'll work on that soon). I think it may be reasonable for site scripts to be able to specify that they want to be loaded in the head, although I'm not sure whether the details of your proposed implementation are the best way to go about this. The reason I kept site scripts in the bottom for now is that they were historically loaded after everything else for backwards compatibility (if they were implicitly depending on e.g. wikibits being available, that expectation won't be broken), but we can also achieve back compat by putting legacy stuff like wikibits in the head and put site scripts below that, also in the head. -- 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
