Adobe GoLive CS2 Tips and Tricks The 250 Best
The source code for every JavaScript Action that you have used throughout your site is stored in an external JavaScript library called CSScriptLib.js, and GoLive automatically creates the file when you use an Action or a rollover in a Web page. This library file, placed into a folder called GeneratedItems at the top level of your Site, includes all the necessary JavaScript for the Actions for the entire site to function properly (Figure 187). Figure 187. The CSScriptLib.js file can drastically reduce the download time of the overall site.
Other Web-authoring applications store the JavaScript code in each page, which is repetitive, unnecessary, and can cause your source code to become really bloated. Using an external JavaScript library means that the code for Actions or rollovers used on multiple pages does not have to be reloaded with each and every page that utilizes the Action. Instead, the library loads the code once, the browser caches it, and you get faster-loading pages. Not only that, but GoLive manages all URLs in the JavaScript library, so you can move pages around or even rename them, and all the referenced URLs are updated as necessary by GoLive. Previous versions of GoLive included the JavaScript code for every installed Action, not just the Actions used. This meant you had to flatten the library for maximum efficiency every time you uploaded the site. GoLive CS2 keeps the JavaScript library lean and mean and only uses the code necessary for the Actions you've used on pages in the site. If you delete any actions from pages in the site, though, the CSScriptLib.js does need to be flattened. By default, GoLive handles the flattening process automatically when the file is uploaded. You can also flatten it manually if you want to see what the file size will be. Choose Site > Flatten JavaScript Library or use the contextual menu to access the Flatten JavaScript Library command.
Trivia The filename CSScriptLib.js has absolutely nothing to do with CSS. The CS stands for CyberStudio, which was the original name of the application before Adobe acquired it from the company named GoLive Systems.
|