Browsium

Browsium Blog

Let’s Get Technical: Script Injection, String Replacement, or Content Override?

Posted by: Browsium Posted date:

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:

  • Script Injection is great when you’re only making changes to Javascript in a page
  • String Replacement is great for making small changes or additions to a page
  • Content Override is great for replacing or removing entire pages at a time

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

  • Share:  
 

Recent Posts

Protecting against Log4j vulnerability and more
Posted on: December 15, 2021
Windows 11 is on the way!
Posted on: June 29, 2021
Spartan is dead, long live Spartan!
Posted on: April 14, 2021

Request Demo