Widget rules: sizes, performance limits and check codes
Sizes, file types, performance limits and every code a check can fail with.
A widget runs in the overlay next to everything else, often on slower PCs. That's why fixed limits apply. Livedeck uses the same numbers in three places: here in the docs, in the automatic test before approval and in the overlay during the LIVE.
The package
ZIP file
5 MB
Unpacked in total
5 MB
Single file
2 MB
Files
200
Path length
180 characters
Folder depth
8
manifest.json
64 KB
| Limit | Value |
|---|---|
| ZIP file | 5 MB |
| Unpacked in total | 5 MB |
| Single file | 2 MB |
| Files | 200 |
| Path length | 180 characters |
| Folder depth | 8 |
| manifest.json | 64 KB |
Allowed file types: html, js, mjs, css, json, svg, txt, md, png, jpg, jpeg, webp, gif, mp3, ogg, wav, woff2. Text files must be UTF-8. Pictures, sounds and fonts must really be what their extension says.
What is not allowed
- Addresses of other sites in HTML, CSS, JavaScript, SVG or JSON (http://, https://, ws://, wss:// or //host). Addresses in comments don't fail the check, but the admin sees them.
- iframe, frame, object, embed, portal, base and meta refresh in HTML
- WebRTC (RTCPeerConnection, STUN or TURN servers), frames from JavaScript (createElement("iframe") or "<iframe" in strings) and connection hints such as dns-prefetch or preconnect. Livedeck also switches these features off inside the widget.
- Scripts, event handlers or foreignObject in SVG files
- Encrypted ZIP files, symbolic links and archives inside the archive
The admin also sees hints about eval, new Function, WebAssembly, WebSockets, access to storage or the overlay window, mining patterns and obfuscated or minified code. Hints don't fail the check right away, but they need a good reason. Ship minified code together with readable sources in a src/ folder.
manifest.json, the src/ folder and .md or .txt files are for the review only. Livedeck never serves them to the overlay, so your code cannot load them. Every user gets your widget under an address of their own.
Performance limits
Ready after the page loaded
3000 ms
Loading the page during the LIVE
15,000 ms
CPU without events (average)
2 %
CPU with very many events (average)
15 %
Memory (JavaScript)
64 MB
Elements on the page
3000
Longest block at a time
200 ms
| Measurement | Limit |
|---|---|
| Ready after the page loaded | 3000 ms |
| Loading the page during the LIVE | 15,000 ms |
| CPU without events (average) | 2 % |
| CPU with very many events (average) | 15 % |
| Memory (JavaScript) | 64 MB |
| Elements on the page | 3000 |
| Longest block at a time | 200 ms |
During the LIVE
- The overlay checks every 2000 ms. 3 answers in a row slower than 1000 ms, or 6000 ms without any answer, switch the widget off.
- When the overlay itself was stuck (for example because the tab was in the background), that never counts against your widget.
- A widget that was switched off stays off until the next reload. The editor then shows "Widget stopped".
Check codes
When a check fails, the editor or the seller studio shows a list of reasons. Every single code is listed here.
ZIP file
zip_too_large
The ZIP file is larger than 5 MB.
zip_total_too_large
Larger than 5 MB once unpacked.
zip_file_too_large
A file is larger than 2 MB.
zip_too_many_files
More than 200 files.
zip_not_zip
Not a ZIP file, or an empty one.
zip_multi_disk
Split into several parts. Pack everything into one file.
zip64_unsupported
ZIP64 is not supported.
zip_trailing_data
There is extra data after the end of the ZIP file.
zip_corrupt
The ZIP file is damaged.
zip_encrypted
The ZIP file is password-protected.
zip_unsupported_method
Compression method not supported. Stored (no compression) and Deflate (the default) are allowed.
zip_header_mismatch
The archive contradicts itself.
zip_overlap
Files overlap inside the archive.
zip_crc_mismatch
Checksum wrong, a file is damaged.
zip_symlink
Symbolic link in the package.
zip_bad_name
Invalid file name: non-ASCII without UTF-8, ../, absolute paths, special characters, longer than 180 characters or deeper than 8 folders.
zip_duplicate_name
A file appears twice in the archive.
zip_nested_archive
An archive inside the archive (for example a ZIP in the ZIP).
| Code | Meaning |
|---|---|
| zip_too_large | The ZIP file is larger than 5 MB. |
| zip_total_too_large | Larger than 5 MB once unpacked. |
| zip_file_too_large | A file is larger than 2 MB. |
| zip_too_many_files | More than 200 files. |
| zip_not_zip | Not a ZIP file, or an empty one. |
| zip_multi_disk | Split into several parts. Pack everything into one file. |
| zip64_unsupported | ZIP64 is not supported. |
| zip_trailing_data | There is extra data after the end of the ZIP file. |
| zip_corrupt | The ZIP file is damaged. |
| zip_encrypted | The ZIP file is password-protected. |
| zip_unsupported_method | Compression method not supported. Stored (no compression) and Deflate (the default) are allowed. |
| zip_header_mismatch | The archive contradicts itself. |
| zip_overlap | Files overlap inside the archive. |
| zip_crc_mismatch | Checksum wrong, a file is damaged. |
| zip_symlink | Symbolic link in the package. |
| zip_bad_name | Invalid file name: non-ASCII without UTF-8, ../, absolute paths, special characters, longer than 180 characters or deeper than 8 folders. |
| zip_duplicate_name | A file appears twice in the archive. |
| zip_nested_archive | An archive inside the archive (for example a ZIP in the ZIP). |
Files and content
manifest_missing
manifest.json is missing. It must be at the top of the ZIP or inside its only folder.
manifest_invalid
manifest.json is invalid. The errors are listed below it (codes in "manifest.json reference").
entry_missing
The start file named in entry is not in the package.
file_type_not_allowed
This file type is not allowed.
file_content_mismatch
The content does not match the extension (for example a JPG named .png).
file_not_utf8
The text file is not saved as UTF-8.
file_empty
The file is empty.
external_reference
The file contains the address of another site (with the line).
forbidden_markup
HTML that is not allowed (iframe, frame, object, embed, portal, base, meta refresh) or script in an SVG file.
forbidden_api
Code that would get around the blocks to the network: WebRTC (RTCPeerConnection, STUN/TURN), frames from JavaScript (createElement("iframe"), "<iframe" in strings) or connection hints (dns-prefetch, preconnect, prerender, prefetch).
| Code | Meaning |
|---|---|
| manifest_missing | manifest.json is missing. It must be at the top of the ZIP or inside its only folder. |
| manifest_invalid | manifest.json is invalid. The errors are listed below it (codes in "manifest.json reference"). |
| entry_missing | The start file named in entry is not in the package. |
| file_type_not_allowed | This file type is not allowed. |
| file_content_mismatch | The content does not match the extension (for example a JPG named .png). |
| file_not_utf8 | The text file is not saved as UTF-8. |
| file_empty | The file is empty. |
| external_reference | The file contains the address of another site (with the line). |
| forbidden_markup | HTML that is not allowed (iframe, frame, object, embed, portal, base, meta refresh) or script in an SVG file. |
| forbidden_api | Code that would get around the blocks to the network: WebRTC (RTCPeerConnection, STUN/TURN), frames from JavaScript (createElement("iframe"), "<iframe" in strings) or connection hints (dns-prefetch, preconnect, prerender, prefetch). |
Automatic test
test_failed means the automatic test broke at least one limit. The single reasons are listed below it, each with the measured value and the limit.
perf_no_ready
The widget never reported to the overlay after loading. Usually <script src="/sdk/v1.js"> is missing or the page never finishes loading.
perf_ready_slow
Ready too late: more than 3000 ms after the page loaded.
perf_unresponsive
Does not answer the overlay's check, or too slowly (the code blocks the browser).
perf_navigated
The widget navigated away or reloaded its page.
perf_flood
The widget sends far too many messages to the overlay.
perf_idle_cpu
More than 2 % CPU while nothing happens.
perf_storm_cpu
More than 15 % CPU with lots of events.
perf_heap
More than 64 MB of memory.
perf_dom
More than 3000 elements on the page.
perf_long_task
Blocks the browser for longer than 200 ms at a time.
network_attempt
Tries to load something from another site (the host is shown).
runtime_errors
Only a hint, not a reason to fail: JavaScript errors during the test. The admin sees the first one.
| Code | Meaning |
|---|---|
| perf_no_ready | The widget never reported to the overlay after loading. Usually <script src="/sdk/v1.js"> is missing or the page never finishes loading. |
| perf_ready_slow | Ready too late: more than 3000 ms after the page loaded. |
| perf_unresponsive | Does not answer the overlay's check, or too slowly (the code blocks the browser). |
| perf_navigated | The widget navigated away or reloaded its page. |
| perf_flood | The widget sends far too many messages to the overlay. |
| perf_idle_cpu | More than 2 % CPU while nothing happens. |
| perf_storm_cpu | More than 15 % CPU with lots of events. |
| perf_heap | More than 64 MB of memory. |
| perf_dom | More than 3000 elements on the page. |
| perf_long_task | Blocks the browser for longer than 200 ms at a time. |
| network_attempt | Tries to load something from another site (the host is shown). |
| runtime_errors | Only a hint, not a reason to fail: JavaScript errors during the test. The admin sees the first one. |
Was this article helpful?