For single page web apps I recommend setting:
response.setHeader("Cache-Control", "no-cache, max-age=0, must-revalidate,
no-store");
I am using Tapestry + React + Typescript for my single page application - works
very well 😊
-----Original Message-----
From: JumpStart <[email protected]>
Sent: fredag 22. februar 2019 02:16
To: Tapestry users <[email protected]>
Subject: Re: Browser History API
Thank you, but I think I’ll mostly want the server-side making the decision on
what to make navigable. We shall see how that pans out.
> On 21 Feb 2019, at 3:29 pm, Svein-Erik Løken <[email protected]> wrote:
>
> You can manipulate the URL from Javascript/Typescript:
>
> (history as History).replaceState(null, "", location.protocol + '//' +
> location.host + location.pathname + "/yourUrlPart");
>
> -----Original Message-----
> From: JumpStart <[email protected]>
> Sent: torsdag 21. februar 2019 05:39
> To: Tapestry users <[email protected]>
> Subject: Browser History API
>
> Has anyone made use of the browser History API with Tapestry AJAX calls?
>
> I have an essentially single page app, all done with Zones and async event
> links. Tabs down one side flips between major functions (eg. Clients,
> Calendar, Billing), replacing the main pane contents, and clicking on buttons
> and links in the pane will often drill into a sub-function (eg. View Client,
> Pay Invoice). All requests are async=“true” and render Zones.
>
> The problem is that the URL in the browser never changes, so if you choose
> Refresh then you’ll go back to the initially displayed page.
>
> But, the app does support query params in the URLs that can navigate to the
> right place (eg. ?fun=CLIENT&sub=UPDATE). I guess what I’d like is a way to
> tell AjaxResponseRenderer what URL I’d like handed to the browser History
> API, and for it to be done automatically.
>
> Cheers,
>
> Geoff
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]