diff --git a/docs/arch/0001-record-architecture-decisions.md b/docs/arch/0001-record-architecture-decisions.md deleted file mode 100644 index 3064db05..00000000 --- a/docs/arch/0001-record-architecture-decisions.md +++ /dev/null @@ -1,19 +0,0 @@ -# 1. Record architecture decisions - -Date: 2019-12-25 - -## Status - -Accepted - -## Context - -We need to record the architectural decisions made on this project. - -## Decision - -We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). - -## Consequences - -See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools). diff --git a/docs/arch/0002-noscript-nodes.md b/docs/arch/0002-noscript-nodes.md deleted file mode 100644 index 41f2283a..00000000 --- a/docs/arch/0002-noscript-nodes.md +++ /dev/null @@ -1,19 +0,0 @@ -# 2. NOSCRIPT nodes - -Date: 2020-04-16 - -## Status - -Accepted - -## Context - -HTML pages can contain `noscript` nodes, which reveal their contents only in case when JavaScript is not available. Most of the time they contain hidden messages that inform about certain JavaScript-dependent features not being operational, however sometimes can also feature media assets or even iframes. - -## Decision - -When the document is being saved with or without JavaScript, each `noscript` node should be preserved while its children need to be processed exactly the same way as the rest of the document. This approach will ensure that even hidden remote assets are embedded — since those hidden elements may have to be displayed later in a browser that has JavaScript turned off. An option should be available to "unwrap" all `noscript` nodes in order to make their contents always visible in the document, complimenting the "disable JS" function of the program. - -## Consequences - -Saved documents will have contents of all `noscript` nodes processed as if they are part of the document's DOM, therefore properly display images encapsulated within `noscript` nodes when being viewed in browsers that have JavaScript turned off (or have no JavaScript support in the first place). The new option to "unwrap" `noscript` elements will help the user ensure that the resulting document always represents what the original web page looked like in a browser that had JavaScript turned off. diff --git a/docs/arch/0003-network-request-timeout.md b/docs/arch/0003-network-request-timeout.md deleted file mode 100644 index 3fc1d7b6..00000000 --- a/docs/arch/0003-network-request-timeout.md +++ /dev/null @@ -1,21 +0,0 @@ -# 3. Network request timeout - -Date: 2020-02-15 - -## Status - -Accepted - -## Context - -A slow network connection and overloaded server may negatively impact network response time. - -## Decision - -Make the program simulate behavior of popular web browsers and CLI tools, where the default network response timeout is most often set to 120 seconds. - -Instead of featuring retries for timed out network requests, the program should have an option to adjust the timeout length, along with making it indefinite when given "0" as its value. - -## Consequences - -The user is able to retrieve resources that have long response time, as well as obtain full control over how soon, and if at all, network requests should time out. diff --git a/docs/arch/0004-asset-integrity-check.md b/docs/arch/0004-asset-integrity-check.md deleted file mode 100644 index 239888e1..00000000 --- a/docs/arch/0004-asset-integrity-check.md +++ /dev/null @@ -1,21 +0,0 @@ -# 4. Asset integrity check - -Date: 2020-02-23 - -## Status - -Accepted - -## Context - -In HTML5, `link` and `script` nodes have an attribute named `integrity`, which lets the browser check if the remote file is valid, mostly for the purpose of enhancing page security. - -## Decision - -In order to replicate the browser's behavior, the program should perform integrity check the same way it does, excluding the linked asset from the final result if such check fails. - -The `integrity` attribute should be removed from nodes, as it bears no benefit for resources embedded as data URLs. - -## Consequences - -Assets that fail to pass the check get excluded from the saved document. Meanwhile, saved documents no longer contain integrity attributes on all `link` and `script` nodes. diff --git a/docs/arch/0005-asset-minimization.md b/docs/arch/0005-asset-minimization.md deleted file mode 100644 index 75890dde..00000000 --- a/docs/arch/0005-asset-minimization.md +++ /dev/null @@ -1,19 +0,0 @@ -# 5. Asset Minimization - -Date: 2020-03-14 - -## Status - -Accepted - -## Context - -It may look like a good idea to make monolith compress retrieved assets while saving the page for the purpose of reducing the resulting document's file size. - -## Decision - -Given that the main purpose of this program is to save pages in a convenient to store and share manner — it's mostly an archiving tool, aside from being able to tell monolith to exclude certain types of asests (e.g. images, CSS, JavaScript), it would be outside of scope of this program to implement code for compressing assets. Minimizing files before embedding them does not reduce the amount of data that needs to be transferred either. A separate tool can be used later to compress and minimize pages saved by monolith, if needed. - -## Consequences - -Monolith will not support modification of original document assets for the purpose of reducing their size, sticking to performing only minimal amount of modifications to the original web page — whatever is needed to provide security or exclude unwanted asset types. diff --git a/docs/arch/0006-reload-and-location-meta-tags.md b/docs/arch/0006-reload-and-location-meta-tags.md deleted file mode 100644 index 6f4d3d73..00000000 --- a/docs/arch/0006-reload-and-location-meta-tags.md +++ /dev/null @@ -1,19 +0,0 @@ -# 6. Reload and location `meta` tags - -Date: 2020-06-25 - -## Status - -Accepted - -## Context - -HTML documents may contain `meta` tags capable of automatically refreshing the page or redirecting to another location. - -## Decision - -Since the resulting document is saved to disk and generally not intended to be served over the network, it only makes sense to remove `meta` tags that have `http-equiv` attribute equal to "Refresh" or "Location", in order to prevent them from reloading the page or redirecting to another location. - -## Consequences - -Monolith will ensure that saved documents do not contain `meta` tags capable of changing location or reloading the page. diff --git a/docs/arch/0007-network-errors.md b/docs/arch/0007-network-errors.md deleted file mode 100644 index 1ca797dd..00000000 --- a/docs/arch/0007-network-errors.md +++ /dev/null @@ -1,19 +0,0 @@ -# 7. Network errors - -Date: 2020-11-22 - -## Status - -Accepted - -## Context - -Servers may return information with HTTP response codes other than `200`, however those responses may still contain useful data. - -## Decision - -Fail by default, notifying of the network error. Add option to continue retrieving assets by treating all response codes as `200`. - -## Consequences - -Monolith will fail to obtain resources with status other than `200`, unless told to ignore network errors. diff --git a/docs/arch/0008-base-tag.md b/docs/arch/0008-base-tag.md deleted file mode 100644 index 491b504e..00000000 --- a/docs/arch/0008-base-tag.md +++ /dev/null @@ -1,40 +0,0 @@ -# 8. Base Tag - -Date: 2020-12-25 - -## Status - -Accepted - -## Context - -HTML documents may contain `base` tag, which influences resolution of anchor links and relative URLs as well as dynamically loaded resources. - -Sometimes, in order to make certain saved documents function closer to how they operate while being served from a remote server, the `base` tag specifying the source page's URL may need to be added to the document. - -There can be only one such tag. If multiple `base` tags are present, only the first encountered tag ends up being used. - -## Decision - -Adding the `base` tag should be optional — saved documents should not contain the `base` tag unless it was specified by the user, or the document originally had the `base` tag in it. - -Existing `href` attribute's value of the original `base` tag should be used for resolving the document's relative links instead of document's own URL (precisely the way browsers do it). - -## Consequences - -#### If the base tag does not exist in the source document - -- If the base tag does not exist in the source document - - With base URL option provided - - use the specified base URL value to retrieve assets, keep original base URL value in the document - - Without base URL option provided - - download document as usual, do not add base tag -- If the base tag already exists in the source document - - With base URL option provided - - we overwrite the original base URL before retrieving assets, keep new base URL value in the document - - Without base URL option provided: - - use the base URL from the original document to retrieve assets, keep original base URL value in the document - -The program will obtain ability to retrieve remote assets for non-remote sources (such as data URLs and local files). - -The program will obatin ability to get rid of existing base tag values (by provind an empty one). diff --git a/docs/references.md b/docs/references.md deleted file mode 100644 index ae0a1254..00000000 --- a/docs/references.md +++ /dev/null @@ -1,3 +0,0 @@ -# References - -- https://content-security-policy.com/ diff --git a/docs/web-apps.md b/docs/web-apps.md deleted file mode 100644 index cc19111d..00000000 --- a/docs/web-apps.md +++ /dev/null @@ -1,23 +0,0 @@ -# Web apps that can be saved with Monolith - -These apps retain all or most of their functionality when saved with Monolith: - - -## Converse - -| Website | https://conversejs.org | -|:-----------------------|:--------------------------------------------------------------------| -| Description | An XMPP client built using web technologies | -| Functionality retained | **full** | -| Command to use | `monolith https://conversejs.org/fullscreen.html > conversejs.html` | -| Monolith version used | 2.2.7 | - - -## Markdown Tables generator - -| Website | https://www.tablesgenerator.com | -|:--------------------------|:-----------------------------------------------------------------------------------------------| -| Description | Tool for creating tables in extended Markdown format | -| Functionality retained | **full** | -| Command to use | `monolith -I https://www.tablesgenerator.com/markdown_tables -o markdown-table-generator.html` | -| Monolith version used | 2.6.1 |