Hi there

Please excuse me, another issue from me. :-)

On the production server go_back does not work as expected for anonymous visitors. It seems that the goback url gets cached. After I clear the cache, the first referer gets cached and does not get regenerated on subsequent visits.

You set the cache max age to 0 at the end of GoBack.php. But according to https://drupal.stackexchange.com/a/185224 this does not work for anonymous users without a session. I believe, that's the source of the problem.

I added the cache killswitch at the end of the build() function (see patch) and it solves this issue. However, as I am not very experienced with caching, I can not rule out that this generates some other issues.

Please review the code and - if possible - suggest a better solution.

Regards, Patrick

Comments

piridium created an issue. See original summary.

piridium’s picture

Title: Not working as expected for anonymous users » Cache issue for anonymous users
StatusFileSize
new515 bytes

  • saesa committed 193d804 on 8.x-1.x
    Issue #3062270 by piridium: Cache issue for anonymous users
saesa’s picture

Status: Needs review » Fixed

Thanks for the patch! :)

saesa’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.