URL Contents Editor

The URL Contents Editor is used to rewrite a URL's response before the WebView renders it.

Adding a URL Target

Begin by creating or editing the package where the URL content rewrite will take place. Detailed instructions on creating and editing packages can be found in the "Creating and Managing Packages" article.

Next, select the 'URL Contents Editor' tab.

Then, select the Profile where the URL content will be rewritten from the dropdown menu.

Next, select the 'Add URL' button.

Finally, enter the exact URL or path after variable substitution in the 'Selected URL target' text box.

It is important to note that a stable full URL or path is preferred. Variables such as {{localUrl}} are supported; however, wildcards are not supported.

It is now possible to configure the selected URL target configurations as well as add content operations.

URL Target Configurations

Allow unsafe HTTPS

When enabled, fetch the source URL with SmartBrowser's relaxed SSL client. It is preferred to have proper certificates in production.

Don't cache result

When enabled, the edited results are not cached. Use while iterating, or when content must stay fresh.

Deleting a URL Target

Begin by selecting the URL targets you wish to delete.

Next, select the 'Delete URL' button located to the left of the 'Selected URL Target' text box.

Creating and Managing Content Operations

URL content operations can be used to add and replace the content of the URL and response string.

Adding an Operation

To add a content operation, begin by selecting the URL target where the operation will take place.

Next, select the 'Add operation' button.

Finally, select the desired operation from the 'operation' drop-down menu and input the required fields. Additional details about each of the operations are listed below.

replace

The replace operation replaces the first found instance of the text in the 'Search (literal)' text box with the replacement text in the 'Replacement' text box.

replaceAll

The replaceAll operation replaces all instances of the text in the 'Search (regex)' text box with the replacement text in the 'Replacement' text box.

prependHead

The prependHead operation finds the first <head> tag and inserts the text in the 'Content' text box immediately after.

The 'Optional wrap tag' wraps the text in the 'Content' text box in <tag>…</tag>.

appendHead

The appendHead operation finds the first <head> tag and inserts the text in the 'Content' text box immediately before it.

The 'Optional wrap tag' wraps the text in the 'Content' text box in <tag>…</tag>.

before

The before function inserts the text in the 'Content' text box at the beginning of the response string.

after

The after function inserts the text in the 'Content' text box at the end of the response string.

fileReplace

The fileReplace operation replaces the first found instance of the text in the 'Search (literal)' text box with the contents of the file listed in the 'File path' text box.

fileReplaceAll

The replaceAll operation replaces all instances of the text in the 'Search (regex)' text box with the contents of the file listed in the 'File path' text box.

filePrependHead

The filePrependHead operation finds the first <head> tag and inserts the contents of the file listed in the 'File path' text box immediately after.

The 'Optional wrap tag' wraps the contents of the file listed in the 'File path' text box in <tag>…</tag>.

fileAppendHead

The fileAppendHead operation finds the first <head> tag and inserts the contents of the file listed in the 'File path' text box immediately before it.

The 'Optional wrap tag' wraps the contents of the file listed in the 'File path' text box in <tag>…</tag>.

fileBefore

The fileBefore function inserts the contents of the file listed in the 'File path' text box at the beginning of the response string.

The 'Optional wrap tag' wraps the contents of the file listed in the 'File path' text box in <tag>…</tag>.

fileAfter

The fileAfter function inserts the contents of the file listed in the 'File path' text box at the end of the response string.

The 'Optional wrap tag' wraps the contents of the file listed in the 'File path' text box in <tag>…</tag>.

Deleting an Operation

To delete an operation, select the 'garbage' button next to the desired operation.

Advanced JSON Editor

The advanced JSON editor displays the URL contents editor data for the selected profile and allows the JSON to be edited directly. The editor also displays the JSON for injections. Additional information about injections can be found here.

To access the advanced JSON editor, select the 'View & Edit JSON' button in the top-right of the page.

Updated on October 29, 2026

Related Articles