Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Optimize HTML
On the server
side where Visualforce validates HTML,
optimized
HTML improves processing
efficiency.
On the client side, optimized HTML makes a Visualforce page more responsive in the user’s
browser.
To optimize the HTML in a Visualforce page:
- Review the HTML that Visualforce components generate. Visualforce pages correct invalid HTML during compilation, which can cause the HTML to render in unintended ways. For example, if you have a <head> or <body> tag inside of your <apex:page> tag, the Visualforce page removes it at run time.
- Review Ajax code. During an Ajax request, to ensure that the response properly fits back into the DOM, the server validates and corrects inbound HTML. Processing time decreases if your Visualforce page contains valid markup and if corrections are unnecessary.
- Reduce HTML bloat. Although the browser caches HTML and compiled Visualforce tags, retrieving them from the cache impacts performance. Unnecessary HTML also increases the size of the component tree and the processing time for Ajax requests.