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:

  1. 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.



  2. 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.


  3. Play the script and you'll see the file size of each element is limited to the range you specified:

 

Icon

Note: The web server must honor the bytes range request header for this function to work. If your web server ignores this header, the script will download full-size objects and no limit will be imposed.

  • No labels