########################################################################################## FKAMP-7: Remove AMP pages from browser history ########################################################################################## Issue Type: New Feature ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Done (2019-06-12 15:29:14) Project: Anti-AMP Scripts (FKAMP) Reported By: btasker Assigned To: btasker Targeted for fix in version: - v1.4.3 Time Estimate: 0 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== Currently, AMP pages remain in the browser history, so if we imagine the following request flow: - Google Search - El Reg AMP page - El Reg HTML page When the user is on El Reg HTML Page they may press back in order to go back to the search results. What'll actually happen though is their browser will go back to the AMP page, which will trigger the redirect and then put them back onto the HTML page. Rather than setting window.location.href when triggering a redirect, we should use window.location.replace() so that the current (i.e. AMP) page isn't written into the browser's history. That way, a back on the El Reg HTML page would take you back to the Google search results ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2019-06-12 12:30:47 git ----------------------------------------------------------------------------------------- -- BEGIN QUOTE -- Repo: RemoveAMP Commit: 10a2696473beed5e71fda44d4298f6ef8c518433 Author: Ben Tasker