Ion includes many ways that you can ‘fix up’ bad, broken or obsolete web content without directly touching the web server. In the past I’ve blogged or posted videos about 3 of our tools: Script Injection, String Replacement and most recently Content Override.
The question is, which to use when? Here’s a quick way to see which is the best solution for a given problem:
Feature | Best when… | Notes and limitations |
Script Injection | …you want to add, change or override existing Javascript in a page | Can only modify JavaScript in a web page; content is inserted into the <head> tag of the document after the page loads and before the OnLoad event of the <body> tag is triggered. Does not work for other scripting languages |
String Replacement | …you only need to make a few small, targeted changes to a page | Can replace content from any loaded resource: CSS, HTML and even script (like VBScript). Useful when changing existing or adding new content, not great at removing large amounts of existing content |
Content Override | …you want to make wholesale content changes, or when you want to remove a large amount of content | Replaces entire pages only, cannot easily strike single lines of code |
Essentially:
Hopefully that helps clear up when each of these features is best applied. As always, keep your eye on our support site for new information, examples and documentation.
-Christopher