[SOLVED] PushState Not Return To Main Page But 404

Hi @nolimits4web,

Im using pushState : true so it will work on android back button, everything is working well,
but when I’m click back few times after open few pages to return main page, 404 page is showed up not return to main page.

please suggest.

Any Tip?

1 Like

Same Problem any sugestion

1 Like

Hi @nolimits4web,

Any suggestion?

1 Like

Means your pushStateRoot is not configured correctly. Use forum search, there were a bunch of similar topics and solutions

Hi @nolimits4web,

it’s working, I put pushStateRoot to my main index on init app :+1::+1::+1::+1:

thank you for your suggestion.

this is my sample

// Init App
var app = new Framework7({
root: ‘#app’,
name: ‘MyApp’,
theme: theme,
routes: routes,
view: {
pushState: true,
pushStateRoot: ‘/example/’, // if the address like this https://www.example.com/example/

Hi @Yudistira, adding pushStateRoot: ‘/example/’, is not working for me.

hi @rkaartikeyan,

what is your app address?

@Yudistira Enabling pushState is triggering 404 Error for root

Hi @rkaartikeyan,

did you save your html file on another folder?

No Bro I enabled pushState: true, i resolved it too :slight_smile: thanks for your reply