Task #7536

Implement a mechanism which saves and restores the path to the last visited page

Added by Robert Lemke over 5 years ago. Updated almost 3 years ago.

Status:Resolved Start date:2010-04-29
Priority:Could have Due date:
Assigned To:Nils Dehl % Done:

100%

Category:-
Target version:-

Description

Some small JS code which is contained on every page rendered by TYPO3 will set a cookie with the path of the current page. This allows us to display exactly that page after a user logged into the backend.

History

#1 Updated by Robert Lemke over 5 years ago

We need a way to figure out the previously visited page through JS (accessing the browser history) and use that information in the Login controller.

Jens, please get in touch with Nils and let him know how that could be implemented.

#2 Updated by Christopher Hlubek over 5 years ago

This seems to be difficult since browsers protect the history data pretty well. I found a StackOverflow discussion that only mentions the link color hack for well-known URLs (http://stackoverflow.com/questions/48805/how-do-you-access-browser-history).

Maybe we could implement this with an hash token #typo3 added to the URL and some JavaScript that checks the location and forwards to the login.

#3 Updated by Daniel Poetzinger over 5 years ago

What about doing history back after sucessful login and redirect to the backend from that page then?

(Contra: If the previous page was loaded after submitting a form or something you get this weird browser message..)

#4 Updated by Nils Dehl over 5 years ago

maybe we can track the HTTP_Referrer in /typo3 controller and save it for example in the session. while rendering the backend and the website iframe we can use this information or if the user starts directly on domain.de/typo3 use the baseurl for the iframe

#5 Updated by Christopher Hlubek over 5 years ago

@Nils Since it's browser dependent the HTTP_REFERER could be an unsafe guess.

My idea of adding "#typo3" to the URL could be problematic if there's an anchor with the name "typo3" on the page and there has to be some kind of "Default JS" on every page to allow the backend switch.

#6 Updated by Robert Lemke over 5 years ago

How about adding some JS to every page by default which sets a cookie with the uuid (or something similar) of the last visited page. IMO this doesn't affect performance in any way and is pretty simple to do.

Is there a good reason why people would like to disable that?

#7 Updated by Robert Lemke over 5 years ago

  • Status changed from Accepted to Needs Feedback
  • Assigned To deleted (Jens Hoffmann)

#8 Updated by Robert Lemke about 5 years ago

  • Status changed from Needs Feedback to New
  • Priority changed from Should have to Could have

During yesterday's Daily Scrum we decided that we go for the cookie solution if we have time left. The history hack isn't technically doable.

#9 Updated by Robert Lemke about 5 years ago

  • Subject changed from JS History hack to Implement a mechanism which saves and restores the path to the last visited page

#10 Updated by Karsten Dambekalns about 5 years ago

  • Target version changed from 518 to 550

#11 Updated by Nils Dehl about 5 years ago

  • Assigned To set to Nils Dehl

#12 Updated by Nils Dehl about 5 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Added basic js path in cookie logging to the default template, to display the last visited FE page in BE's FE editing. r4487

#13 Updated by Nils Dehl about 5 years ago

  • Status changed from Closed to Resolved

#14 Updated by Robert Lemke about 4 years ago

  • Project changed from Core Team to Base Distribution
  • Target version deleted (550)

#15 Updated by Robert Lemke almost 3 years ago

  • Project changed from Base Distribution to TYPO3.Neos

Also available in: Atom PDF