# How to handle referer with AJAX requests

**URL:** <https://community.gatling.io/t/how-to-handle-referer-with-ajax-requests/5758>\
**Category:** Gatling (Open-Source)\
**Created:** [August 12, 2020, 4:33pm UTC](https://community.gatling.io/t/how-to-handle-referer-with-ajax-requests/5758 "2020-08-12T16:33:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![PASS\_IT\_Consulting\_G](https://avatars.discourse-cdn.com/v4/letter/p/96bed5/32.png) [@PASS\_IT\_Consulting\_G](https://community.gatling.io/u/PASS_IT_Consulting_G)\
**Post date:** [August 12, 2020, 4:33pm UTC](https://community.gatling.io/t/how-to-handle-referer-with-ajax-requests/5758/1 "2020-08-12T16:33:19Z")

</div>

I have a HTML page to which I am redirected via an 302 error code.

This Pages now makes some AJAX requests How can I make sure that all the AJAX request use the URL from the 302 redirection as their referer.

In the documentation I only found the hint referers are handled automatically but you can disable it. However I found no details on how the referer is set.  
is is always the location of the last request carried out with exec ?  
And what about the resources( function)? what i is theri referer?

In my situation how can I model my request and the 4 Ajax requests. I would think not using resources() since they are retrieved paralle to the requet and I want the Ajaxrequest in sequence with some delay between them
