Yellow redirects - how to reproduce

When looking at my test, there are some JS requests that are highligted with the yellow background, indicating there is a redirect.

If I request the resource myself in Chrome or PostMan, I cannot see that there is a redirect.

How do I reproduce the same redirects as webpagetest detects? (or event better, how do I get rid of them :wink:

Test url: https://webpagetest.org/result/210503_BiDcS9_f40a6e3053772fdecd68f4fb4620cc24/1/details/

PS: Thank for a great tool!

1 Like

Hi Johannes,

I tend to use the curl tool to reproduce requests. Thanks for providing a test result. I’ve picked the first redirect at request 6 and reproduce it with:

❯ curl -I 'https://grene-prod-shop-assets.azureedge.net/client/dist/js/app.a9876740.js'
HTTP/2 301 
content-length: 179
content-type: text/html; charset=UTF-8
location: https://sostrenegrene.com/client/dist/js/app.a9876740.js
x-cache: TCP_MISS
server: Microsoft-IIS/10.0
x-content-type-options: nosniff
strict-transport-security: max-age=10886400
x-xss-protection: 1; mode=block
x-frame-options: sameorigin
x-azure-ref: 0OlaSYAAAAACjA9NLcaRqQaSpVv9oA8MCTE9OMjFFREdFMTUwOABkMzE2MGZhZi01ODAzLTQxNDktOTRjOC02YTc2MjE5NzAxNzk=
date: Wed, 05 May 2021 08:24:26 GMT

You can see that running this locally also sees a 301 redirect.

In the waterfall, this redirect leads to another request to the redirected asset, request 9 in the waterfall. So this adds a little delay.

I’m not sure why I don’t see the same redirect myself in Chrome. Oddly requesting a compressed response doesn’t give a redirect:

❯ curl --compressed -I 'https://grene-prod-shop-assets.azureedge.net/client/dist/js/app.a9876740.js'
HTTP/2 200 
cache-control: max-age=31536000
content-length: 76808
content-type: application/x-javascript
content-encoding: gzip
last-modified: Mon, 03 May 2021 04:27:55 GMT
accept-ranges: bytes
etag: "8057db0d43fd71:0"
vary: Accept-Encoding
x-cache: TCP_HIT
request-context: appId=cid-v1:cfc82aeb-02b5-446a-9d5c-a1c9aa43ab3e
access-control-expose-headers: Request-Context
x-content-type-options: nosniff
strict-transport-security: max-age=10886400
x-xss-protection: 1; mode=block
x-frame-options: sameorigin
x-azure-ref: 07FqSYAAAAADVGrLpedhkT734HmzlfiaLTE9OMjFFREdFMTUyMgBkMzE2MGZhZi01ODAzLTQxNDktOTRjOC02YTc2MjE5NzAxNzk=
date: Wed, 05 May 2021 08:44:28 GMT

Regards, Leon

1 Like