WebPagetest Forums
Script to add or set header not working - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Bugs/Issues (/forumdisplay.php?fid=10)
+--- Thread: Script to add or set header not working (/showthread.php?tid=15884)



Script to add or set header not working - santoshpadhy - 09-09-2019 04:02 PM

I am trying to set a header using script as below. But its showing script error on click of submit.

setHeader(singletabspace)sl-page: master


RE: Script to add or set header not working - pmeenan - 09-09-2019 11:05 PM

Is that your entire script? You need at least 1 navigate command after that to load the page you want to test.


RE: Script to add or set header not working - santoshpadhy - 09-09-2019 11:39 PM

Suppose I want to test xyz.com. I have entered the URL in the URL text input box. I just want to set a header when loading the same xyz.com. I don't want to navigate anywhere. Based on the header my webpage loads differently.


RE: Script to add or set header not working - pmeenan - 09-10-2019 12:45 AM

You still need a navigate command in the script. It can be "navigate %URL%" which will navigate to whatever URL was in the URL input but if a script is present it completely takes over the testing flow.