In synthetic scripts, you can limit the size of downloaded objects by specifying a range of bytes in an HTTP Header. This works for a single object, or for EVERY object in a full page, as long as the web server honors the bytes range header.
To add a byte range header in your script, do the following:
- Click on the Script button in your script, then reveal the Headers tab, then click the "+" button on the right to add a new header.
- In the name/value fields for your new header, enter "Range" and "bytes=0-25000" (my example) or whatever byte limit you want imposed on requests.
- Play the script and you'll see the file size of each element is limited to the range you specified: