1

I have a problem (no wayyy !?).. Like I said in my browser, when I click on the previous button, it makes an AJAX request.. So it could be a little bit disturbing for the users of my website. So why it does this ? and how to solve it ?

Here the code concerned in my controller. I'm using Laravel 4.1.

        if (Request::ajax()) {
            return Response::json($viewContent);
        }

        return View::make($viewName, $viewContent);

Please, Thanks.

EDIT: I confirm that 'Previous' button mean the browsers back button.

Brazeredge
  • 1,061
  • 1
  • 7
  • 12

1 Answers1

2

Ok so I discovered that when my chrome console is opened it doesn't make an AJAX request when I click on the previous button of my browser.. so it returns the View I wish.

Tell me that someone has been in the same situation..

Brazeredge
  • 1,061
  • 1
  • 7
  • 12