-
Notifications
You must be signed in to change notification settings - Fork 16
Sets of edits
The WWW has undergone many technological changes in recent years. Initially, browsers older than 5 years stopped opening web sites due to changes in image formats, HTML tags, JavaScript and CSS changes. Then traffic encryption (HTTPS) became a new trouble to old browsers. Also some interactive services in software, that using HTTP for network tasks, are stopped working after disable or change of servers.
WebOne can make all corrections to make particular websites (services) usable in particular old browsers (applications). It only needs specific instructions. These instructions are called Sets of edits, and commands from instructions are the Edits.
The Set of edits can contain detection rules (determining when the Set should be used) and edition rules (what should be edited to make the web site usable in particular browser).
The section title contains first (or single) URL regular expression mask determining on which URLs the Set should be used.
Some rules can be checked for both HTTP client requests and HTTP server responses (like URL), some can be only for HTTP responses (like status code or content type). So if the set is containing detection rules which cannot be checked on request time, WebOne will check and probably use the Set at the time of processing of remote server response.
If the URL in the title is not single, additional URL masks can be added as OnUrl rules. Example:
[Edit:jquery.min.js]
OnUrl=jquery2.js
;Will fire on:
; https://example.com/0458/jquery2.js
; https://example.com/assets/javascript/jquery.min.js?assets_version=102
; https://example.com/libs/jquery/jquery.min.js
Added in v0.10.0.
If the OnUrl masks (or the mask in the title) is not so quite detailed, you may add similar masks that will determine URL black list. Example:
[Edit:bootstrap.min.js]
IgnoreUrl=2.3.1
;Will fire on:
; http://maxcdn.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js
; http://maxcdn.bootstrapcdn.com/bootstrap/4.5.6/js/bootstrap.min.js
; http://maxcdn.bootstrapcdn.com/bootstrap/1.0.0/js/bootstrap.min.js
;But not on:
; http://maxcdn.bootstrapcdn.com/bootstrap/2.3.1/js/bootstrap.min.js
Hint: Add IgnoreUrl=webdav
rule in every set to disable them on WebDAV servers. Most of them are running on webdav.company.org domains, so the rule will work fine.
Added in v0.10.0.
It is possible to run the Set only on replies with particular MIME content types.
Added in v0.10.0.
It is possible to run the Set only on replies with particular response code. It may be a real code (e.g. 200 or 403) or a "abbreviation":
- 0 = less than 300
- 2 = 2XX
- 3 = 3XX
- 4 = 4XX
Added in v0.10.0.
Sometimes it is need to run the Set only when the client sends particular request header. E.g. only for browsers which sending concrete User-Agent string. For those cases there is OnHeader rule. Example:
OnHeader=User-Agent: Mozilla/0
OnHeader=User-Agent: Mozilla/1
OnHeader=User-Agent: Mozilla/2
OnHeader=User-Agent: Mozilla/3
; set with these rules will apply only to traffic with old web browsers like Netscape 3.0
; because it sends "User-Agent: Mozilla/3.04Gold (WinNT; U)" header to every request.
Added in v0.10.1.
If the Set is applicable for current HTTP request/response, all of Set's editing rules will be applied to the operation.
Return a HTTP-302 redirect to a particular URL. Added in v0.10.0.
Same as AddRedirect, but return a page from that URL without saying to the browser that the requested page is really a one from the redirect destination. Ignored on response processing. Added in v0.10.0.
Add a header(s) to HTTP/HTTPS request. Ignored on response processing. Added in v0.10.0.
Add a header(s) to HTTP response. May be useful for manual adding of cookies, plugin overriding, etc. Added in v0.10.0.
Convert the content using a external format converting utility. For example, convert a WebP image to GIF, compress a JPEG picture for slow modem line or trans-code a 8K h264 video to Intel Indeo with low bit rate and resolution.
The argument is name of converter utility.
This rule should be used together with additional parameter-setting rules: AddConvertDest, AddConvertArg1, AddConvertArg2, etc.
;Example: convert all PNGs and WEBPs to GIF.
[Edit:.*]
OnContentType=image/png
OnContentType=image/webp
AddConvert=convert
AddConvertDest=gif
AddResponseHeader=Content-Type: image/gif
Added in v0.10.0.
See above. All were added in v0.10.0.
Add these rules to apply edits to text part of responses. E.g. replace too modern JavaScript functions to their older equivalents, hide inline scripts, edit CSS on fly.
One set can contain multiple AddFind/AddReplace edits, but count of both them must be similar.
;Example: JS patch for Old-DOS.ru
[Edit:^http://old-dos.ru]
AddFind=eval\(('|")(.*?)\1\)
AddReplace=$2
AddFind=var _tmr = _tmr .* \[\];
AddReplace=var _tmr = _tmr;
Added in v0.10.0.
- Release Archive
- Websites edits / Syntax of traffic edits
- Known bugs / Report a new bug
- Windows installation
- Linux installation
- macOS installation
- Android installation
- Configuration file
- Command line arguments
Usage:
- Installing the Root Certificate
- YouTube playback
- Using with ViewTube
- Using with virtual machines
- Using with FTP servers
- Using with MSN Messenger
Web standards timeline:
Troubleshooting guides:
Developer corner: