Hello,
I'de like to externalize the Javascript of scriptaculous into external .js files, in order to improve response time. I copied all contents of SULibrary to several .js files. In #updateRoot: of my component, I added the following code (#javascriptPaths returns a collection of paths) : CBOConfiguration javascriptPaths do: [:each | anHtmlRoot scriptElementWithSrc: each] When I look at the generated source, I have correct <script> entries, which give the same javasript code as when using the SULibrary. However, I don't have the expected functionality. For example, the updater is broken, my code on the server side is never called. If I switch back to using "addLibrary: SULibrary" in #registerAsApplication, it works again. Does someone have a clue ? Thanks Vincent _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
I've done this myself to all the libraries here, but I also merged them
into a single file, aHtmlRoot linkToScript: '/other/scriptaculous/all.js' If your script fails when you do this, I would recommend installing something like Firebug (which everyone should have anyway) and debug the JavaScript errors that come up, http://www.getfirebug.com/ Hope this helps, -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Vincent Girard-Reydet Sent: Monday, January 08, 2007 7:08 AM To: The Squeak Enterprise Aubergines Server - general discussion. Subject: [Seaside] How to externalize scriptaculous javascript ? Hello, I'de like to externalize the Javascript of scriptaculous into external .js files, in order to improve response time. I copied all contents of SULibrary to several .js files. In #updateRoot: of my component, I added the following code (#javascriptPaths returns a collection of paths) : CBOConfiguration javascriptPaths do: [:each | anHtmlRoot scriptElementWithSrc: each] When I look at the generated source, I have correct <script> entries, which give the same javasript code as when using the SULibrary. However, I don't have the expected functionality. For example, the updater is broken, my code on the server side is never called. If I switch back to using "addLibrary: SULibrary" in #registerAsApplication, it works again. Does someone have a clue ? Thanks Vincent _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Boris Popov wrote:
> I've done this myself to all the libraries here, but I also merged them > into a single file, > > aHtmlRoot linkToScript: '/other/scriptaculous/all.js' > > If your script fails when you do this, I would recommend installing > something like Firebug (which everyone should have anyway) and debug the > JavaScript errors that come up, > > http://www.getfirebug.com/ > > Hope this helps, > > -Boris > Thank you, it works just fine ! An interesting remark: removing all link to libraries (even the WAStandardScripts library) and moving all scripts and CSS to static files allowed me a x5 performance gain. Vincent _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |