Adding a query string to every resource

Is there any way that I can script WPT to append a query string to every single resource request being made. Currently I know by doing a setCookie it would work but its easier on the server side to grab a query param than parse a cookie for me and hence wondering if I can do this?