Category: Appsmith Support

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Application embedded in html iframe shows issue on page reload


I am embedding my application in an HTML iframe and every time I reload the page, it shows the login page instead of the current running page. The issue does not occur when I directly access the application URL in a browser. I have a custom login page inside the application with tabs for different pages. The current tab value is stored in local storage but is resetting to the default tab on page reload. I tried setting the current tab value onPageLoad using JSObjects, which worked locally but not on the actual domain server. There are no errors in the console logs.


The issue is that upon page reload, the login page is showing instead of the current running page in an embedded HTML iframe. The solution involves setting the current tab value onPageLoad with JSObjects and validating the token with custom authentication. This can be achieved by debugging the value of the variable used to check the tab by rendering it on a text widget, to see if it persists or not.

There were some issues when testing the solution on the actual domain server, but there were no errors relating to the issue found in the console logs. Debugging further may be necessary to determine the cause of the issue.