I have a js routine in my Laravel app that saves some data to the database using an axios call that is working, however, i need to force a page reload so the data shows in a table. when I call
location.reload(true)
The data doesn't show but if i do a manual reload of the page by clicking it, the data appears in the table.
Thanks for your reply, I can only answer yes and no! Yes, the form disappears and re-draws (giving the impression of a reload) but No, the new line of data does not appear.
I will comment out the reload, and try your suggestion of doing a console reload after i press the save button!
It sounds like the issue might be due to the browser caching the page or the data table not being re-rendered properly after location.reload(true). While location.reload(true) is intended to force a reload from the server, most modern browsers ignore the true parameter due to deprecation. Instead, you could try using window.location.href = window.location.href to ensure a full reload, or better yet, update the table dynamically after your Axios call succeeds, rather than reloading the entire page—this would offer a smoother UX and avoid reload quirks... Try out this App: www.movieboxhd.app