SPA NodeJS Page Not Formatted when Back is Pressed

I think this issue has been raised before but I am unable to find the post. So re-posting it.

When I open my app in browser, and click a few links which redirect me to other parts of the app, all works fine. No issues at all.
Also, when I press browser back, and go to previous pages, then go forward and then go back again etc… all worked well. Even refreshing pages works fine.

The issue arises when, say, I navigated a few times back-and-forth, and then I go to some other page in the app by writing it out in the address bar. The page is loaded fine again, but when I press browser back, the previous page is shown as plain HTML without any layout page nor any CSS etc.

Interestingly, if I do a refresh here, not only the page loads up correctly (as expected)… but it also allows me to go forward to the URL that I had entered in the address bar - and that page again opens perfectly fine.

Bump @patrick


@sid I posted this originally, but didn’t get much attention - so bump from me, too!

1 Like

I get exactly the same issue. The bug come when I go back with the browser after navigating using an internal link and then manually go to an url by typing the location in the bar.

For example:

  1. /
  2. /bench
  3. /bench/5
  4. /bench/456 by typing the address in the browser manually
  5. press back button => page is unstyled, not parsed (I see {{myvar.value}} for example) and in network tab I see that the page I receive contain <!-- Wappler include ... --> so I don’t have the full page with the layout just the content page.

I have one layout, some partials and content page.

EDIT: The bug don’t occured when I do:

  1. /bench/8 by typing the address
  2. /bench/546 by typing too
  3. then pressing back here don’t trigger the issue

EDIT 2: I’ve tried to delete internal option on links but it doesn’t fix anything

EDIT 3: The bug is triggered too if i don’t use routes with parameters:

  1. /
  2. /bench manually
  3. back here trigger the bug


My routes are bound to a layout (handle header, get serverconnect translations, etc), a content page and a server action (restrict the page to authentified user)

1 Like

Here’s the latest version of the routing which should fix your issue: (1.9 KB)

1 Like

Thank you Teodor, but it did not work the issue is still there.

  1. I move your file to public/dmxAppConnect/dmxRouting/ replacing the one there ;
  2. Deployed in Wappler the project ;
  3. Go to route ‘/’ then ‘/benchmark’ ;
  4. Go then via the address bar manually to ‘/’ ;
  5. The page is not processed:

Make sure yo clear your browser cache. We tested this on a couple of pages including sid’s website and it works fine now.

1 Like

Yes it was the cache :smiley: it work !


This has been fixed in Wappler 3.7.7

This topic was automatically closed after 44 hours. New replies are no longer allowed.