Skip to content

Commit b19d8c4

Browse files
committed
fix: improve clarity and grammar in README.md
1 parent 5cc26e8 commit b19d8c4

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

README.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# Microservice for prerendering web pages.
1+
# Microservice for prerendering web pages
22

3-
Web pages that are rendered on the browser side and made without SSR are not seen by bots. Because bots can't render pages. This microservice allows all bots to see the already rendered page.
3+
Web pages rendered on the client side without SSR are not visible to bots, because bots can't render pages. This microservice allows all bots to see the already rendered page.
44

55
Features:
66

77
- Allows bots to see content on web pages without SSR
8-
- Works on any framework, ex: JQuery, Angular 1, StencilJS and others
9-
- Works on any technologies, ex: WebComponents, Microfrontends, Dynamic Content and others
10-
- Fast speed and low memory usage, inside only web engine without heavy browser
11-
- The prerender can work not only for bots but also for all clients if the application supports rerendering
12-
- Includes exporter of metrics for Prometheus
8+
- Works with any framework, e.g. JQuery, Angular 1, StencilJS, and others
9+
- Works with any technology, e.g. WebComponents, Microfrontends, Dynamic Content, and others
10+
- Fast and low memory usage, uses only a web engine without a heavy browser
11+
- Prerendering can work not only for bots but also for all clients if the application supports rerendering
12+
- Includes a Prometheus metrics exporter
1313

1414
## Try
1515

@@ -19,13 +19,13 @@ To try the microservice features, run the container with the command:
1919
docker run -it --rm -p 3000:3000 mtsrus/botview
2020
```
2121

22-
Now you can open the browser and check the work with the command:
22+
Now you can open the browser and check the result with the command:
2323

2424
```sh
2525
http://localhost:3000/render/https://mts.ru/
2626
```
2727

28-
The fully rendered page should display, including all content.
28+
The fully rendered page should be displayed, including all content.
2929

3030
## Use
3131

@@ -37,7 +37,7 @@ docker run -d --restart always -p 3000:3000 mtsrus/botview
3737

3838
## Return status code
3939

40-
Add the following element to your html and specify the required response status code:
40+
Add the following element to your HTML and specify the required response status code:
4141

4242
```html
4343
<meta name="prerender-status" content="301" />
@@ -47,8 +47,9 @@ The server will return a response with the specified status code.
4747

4848
## Container parameters
4949

50-
- `-e BOTVIEW_BASIC_AUTHS=""` - an array of endpoints with basic authorization parameters, default empty.
51-
Has format "url:login:password" (URL-encoding is optional for simple URLs). Use comma or space as separator.
50+
51+
- `-e BOTVIEW_BASIC_AUTHS=""` - An array of endpoints with basic authorization parameters, default is empty.
52+
Format: "url:login:password" (URL-encoding is optional for simple URLs). Use comma or space as a separator.
5253
Example: `"https://example.com:user:pass,https://test.com:admin:secret"`
5354

5455
- `-e BOTVIEW_NAV_TIMEOUT=30000` - [This setting will change the default maximum navigation time](https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout),
@@ -71,25 +72,25 @@ The server will return a response with the specified status code.
7172

7273
- `-e BOTVIEW_BLOCK_MEDIA=true` - Block loading of media files to improve performance, default true.
7374

74-
- `-e BOTVIEW_BLOCK_URLS="https://an.yandex.ru, https://mc.yandex.ru"` - Comma or space separated list of URL prefixes to block (uses startsWith matching), default blocks Yandex analytics.
75+
- `-e BOTVIEW_BLOCK_URLS="https://an.yandex.ru, https://mc.yandex.ru"` - Comma or space separated list of URL prefixes to block (uses startsWith matching), by default blocks Yandex analytics.
7576
Example: `"https://google-analytics.com,https://facebook.com/tr"` will block all requests starting with these URLs.
76-
Set to empty string `""` to disable default blocking.
77+
Set to an empty string `""` to disable default blocking.
7778

78-
- `-e BOTVIEW_BLOCK_URLS_REGEX=""` - Comma or space separated list of regular expressions to block URLs, default empty.
79+
- `-e BOTVIEW_BLOCK_URLS_REGEX=""` - Comma or space separated list of regular expressions to block URLs, default is empty.
7980
Example: `".*\.ads\..*,.*tracking.*"` will block URLs containing ".ads." or "tracking" anywhere in the URL.
8081

8182
- `-e BOTVIEW_LOG_LEVEL=info` - Log level for the application, default "info".
8283
Available levels: `trace`, `debug`, `info`, `warn`, `error`, `fatal`.
8384

8485
## Troubleshooting Timeout Issues
8586

86-
If you encounter timeout errors during prerendering, it's usually caused by "leaked requests" - network requests that don't complete properly and prevent the page from finishing loading.
87+
If you encounter timeout errors during prerendering, it is usually caused by "leaked requests" - network requests that do not complete properly and prevent the page from finishing loading.
8788

8889
To fix this:
8990

9091
1. **Check the logs** for entries containing `"Leaked requests"` - these will show which URLs are causing the timeout
91-
2. **Add problematic URLs to BOTVIEW_BLOCK_URLS** to prevent them from being loaded during prerendering
92-
3. **Use the container parameter** `-e BOTVIEW_BLOCK_URLS="url1,url2,url3"` to block specific URLs
92+
2. **Add problematic URLs to BOTVIEW_BLOCK_URLS** to prevent them from being loaded during prerendering.
93+
3. **Use the container parameter** `-e BOTVIEW_BLOCK_URLS="url1,url2,url3"` to block specific URLs.
9394

9495
**Example:**
9596

@@ -102,13 +103,13 @@ By default, `https://an.yandex.ru` and `https://mc.yandex.ru` are blocked due to
102103

103104
## Metrics Prometheus
104105

105-
The microservice has built-in Prometheus monitoring and is located on the endpoint `/metrics`.
106+
The microservice has built-in Prometheus monitoring and is available at the endpoint `/metrics`.
106107

107108
Block this endpoint on the proxy if you do not need to provide access to metrics from outside your network.
108109

109110
## Proxy server setup
110111

111-
In order to catch bots and send them to the prerendering microservice, you need to configure a proxy server.
112+
To catch bots and send them to the prerendering microservice, you need to configure a proxy server.
112113

113114
Example config for Nginx:
114115

0 commit comments

Comments
 (0)