# Request.referrer is set to current url

**URL:** <https://discuss.hotwired.dev/t/request-referrer-is-set-to-current-url/3110>\
**Category:** General\
**Created:** [July 23, 2021, 11:56am UTC](https://discuss.hotwired.dev/t/request-referrer-is-set-to-current-url/3110 "2021-07-23T11:56:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cripsy](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.hotwired.dev/cripsy/32/2139_2.png) [@cripsy](https://discuss.hotwired.dev/u/cripsy)\
**Post date:** [July 23, 2021, 11:56am UTC](https://discuss.hotwired.dev/t/request-referrer-is-set-to-current-url/3110/1 "2021-07-23T11:56:20Z")

</div>

Hi everyone

Before my question: a big Thank you for the great work you’ve been putting in the Hotwire approach so far. I very much appreciate it.

I’m stumbling upon the `link_to :back` functionality in Rails together with Turbo.

I put

```auto
<div>
  <%= "request.referrer: #{request.referrer} %>
</div>

```

inside my `application.html.erb` to examine the `request.referrer` on each request and it seems to always have the current url instead of the previous, which results in not being able to use the `link_to :back`:

![with_turbo](https://canada1.discourse-cdn.com/flex027/uploads/stimulusjs/original/2X/9/9b80d8f93507e4a90e1c91b8b81ff605383e0575.gif)

When I comment out the turbo-import in my `application.js`

```auto
// import "@hotwired/turbo-rails"

```

the request.referrer has the expected value:

![without_turbo](https://canada1.discourse-cdn.com/flex027/uploads/stimulusjs/original/2X/e/e0fbfd37dfd1767d85ed2d7866094aba0c4769c7.gif)

Is this the intended behavior?
