Optimizing HTML

graphics/new_icon.jpg

Another exciting new enhancement to FrontPage publishing introduced in FrontPage 2003 is the Optimize HTML feature. Using this feature, you can reduce the size of your files, thereby creating a faster browsing experience for your site visitors. Don't expect a huge increase though. Unless you have used a very large number of FrontPage components in your site, you won't be removing enough code to make a significant difference.

When using this feature, FrontPage will optimize the HTML of your Web pages before transferring them to the remote Web server. What types of optimization FrontPage performs depend on how you have configured the optimizations in the Remote Web Site Properties dialog.

The Optimize HTML settings (shown in Figure 16.6) are available by selecting View, Remote Web Site, clicking the Remote Web Site Properties button, and then clicking the Optimize HTML tab, or by clicking the Optimize Published HTML button.

Figure 16.6. FrontPage 2003 offers a wide assortment of HTML optimizations that can be applied when publishing your Web site.

graphics/16fig06.jpg

NOTE

FrontPage will only apply the HTML optimizations when publishing from a local Web server to a remote Web server. This prevents any changes to the original source files.


By checking the When Publishing, Optimize HTML by Removing the Following Elements: check box, the following optimization settings are available:

  • All HTML Comments Selects all the check boxes in the Comments section, thereby removing all comments from your Web pages when publishing.

  • Author-time Web Component comments Removes all comments for author-time Web components. Removing these comments will make it impossible to edit the FrontPage Web component on the remote Web server.

  • Browse-time Web Component comments Removes the comments for browse-time Web components. This option is unavailable if the FrontPage or SharePoint Services option is chosen on the Remote Web Site tab because removing these comments in that situation would break the Web components.

  • Theme and Shared Border comments Removes the comments for themes and shared borders. This option is unavailable if the FrontPage or SharePoint Services option is chosen on the Remote Web Site tab because removing these comments in that situation would break the themes and shared borders.

  • Dynamic Web Template comments Removes comments from Dynamic Web Templates and the pages to which they are attached. Removing these comments essentially detaches the Web pages on the remote Web server from the Dynamic Web Template and converts the Dynamic Web Template on the remote server into a regular page.

  • Layout Tables and Cell Formatting comments Removes comments for FrontPage Layout Tables and Cells. Although this does convert the table in the Web page on the remote Web server back into a regular table, layout tools can be re-enabled on the remote server if needed.

  • Script comments Removes comments from client-side scripts.

  • All other HTML comments Removes all HTML comments not covered in any of the preceding options.

  • HTML leading whitespace Removes any tab characters or spaces at the beginning of all lines of code.

  • HTML all whitespace Removes all whitespace in HTML code. This includes any line breaks in the code, but does not include any whitespace inside scripts.

  • FrontPage Tracing Image and Interactive Button attributes Removes the attributes from Tracing Images and Interactive Buttons. These attributes allow you to see Tracing Images and edit Interactive Buttons in the local Web site.

  • Generator and ProgID tags Removes the FrontPage Generator and ProgID meta tags from your pages when the Web site is published.

By clicking the Set as Default button, you can save the current optimization settings as the default settings for your Web site so that they can be restored easily by clicking the Restore Defaults button. This change only applies to the site currently open in FrontPage and not to other Web sites.

graphics/troubleshooting_icon.jpg

If you copy your files to the remote Web server, and the optimization settings don't seem to work, see "HTML Optimization Doesn't Change Anything" in the "Troubleshooting" section of this chapter.




Special Edition Using Microsoft Office FrontPage 2003
Special Edition Using Microsoft Office FrontPage 2003
ISBN: 0789729547
EAN: 2147483647
Year: 2003
Pages: 443

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net