Max Script size

Hi all.

I want to clarify a few points

  1. Is there a limit on the size of the script that is sent for processing.

  2. If there is such a limitation, can we, having bought one of the packages, be able to manipulate this parameter. The fact is that we can have very large scripts (up to 10 kilobytes)

Thanks !

1 Like

For clarification, are you talking about a size limit on Custom Scripts or something else? (Want to make sure I’m following. :slight_smile: )

1 Like

Thanks for your answer !
Yes, you are right , i`m talking about size of Custom Scripts
we want to call the webpagetest npm module and pass it a Custom Script as a parameter, which can be large (up to 10 kilobytes)

1 Like

There shouldn’t be a limit. If you are calling the API you will have to do it through a POST instead of as query params.

Try it through the UI. If it works there then it will be fine through the API as well (UI uses the API).

Only limit I know of is the number of navigation steps allowed within a script (to prevent abuse).

1 Like

Ok, clear
but please inform me what is the maximum number of steps for navigation ?

1 Like

There is a limit of 20 navigation steps (navigate commands and any “andWait” commands).

1 Like

Thanks for clarification !

1 Like

Patrick please say me - can we increase the number of available steps to ~40 if we buy a subscription to one of the available packages?

1 Like

Not currently but I’ll send it over to the team to consider. The problem is that a 40-step script can take a REALLY long time to run and could be used an an end-run around the API testing limits (where a script just counts as a single test). To allow 40 steps in a script would probably require changing the accounting.

1 Like

It might also be worth chatting about what you’re doing that needs more than 20 measured steps (just in case you might be over-using “andWait”). The andWait steps are not needed for every script execution, just when it is doing something that actually causes something to load (like going from a landing page to a search to a product listing page). Filling out forms and such can be done with just exec commands that don’t count as steps.

1 Like

Hi Patrick!
Yes, we found an opportunity to reduce the number of steps (combining JS into one execAndWait). Thank you for your answers - it may be relevant for us to raise the number of steps in the future if we successfully integrate your performance reports into our system. Thanks again for the constructive dialogue.

Dmytro

1 Like

@Dmytro_Stramousov did you got how to increase the count. I am also facing the same. I read in the forum that “just change the $navigateCount > 50,100 or whatever value you want the max to be” would work but even after changing the count in runtest.php it did not worked. I may missing anything I also restart my wpt server machine after changing the count