4 Easy Steps
- 1Download the code
- 2Change the attributes for each SCRIPT element
- 3Add the GhostWriter scripts at the bottom
- 4Customize priorities, monitoring and measurements
1. Download the code
Download the free trial version of GhostWriter. Once you’ve obtained the zip, upload the files to your site.
2. Change SCRIPT attributes
GhostWriter works by allowing the browser to delay execution and loading of your JavaScript code until the page is displayed to the user. To get the browser to skip over the page’s SCRIPT elements, simply change the type attribute value and rename the src attribute.
Example
BEFORE
<!– Inline Script –>
<script type=”text/javascript” language=”javaScript”>
/* Code */
</script>
<!– Remote Script –>
<script type=”text/javascript” src=”/scripts/script.js”></script>
AFTER
<!– Inline Script –>
<script type=”text/deferscript”>
/* Code remains untouched! */
</script>
<!– Remote Script –>
<script type=”text/deferscript” defersrc=”/scripts/script.js”></script>
3. Add GhostWriter
At the bottom of the page, add a reference to GhostWriter’s JavaScript and trigger the initialization. GhostWriter JavaScript is optimized for load time using Google’s Closure Compiler and is only 8 Kilobytes when delivered with Gzip compression.
<script src=”/gw-2010.10.5/lib/gw.min.js”></script>
<script>setTimeout(ghostwriter.loadscripts, 250);</script>
4. Customize
We’ll work with you to customize GhostWriter’s advanced monitoring, measuring, alerting and prioritization mechanisms to insure your pages are aligned with your business needs and still provide visitors with the best possible experience!
