After successfully saving a form and receiving a success message, I am able to redirect to another page using window.location.href = '/home';
with no issues. However, I would like to pass the success message to the home page after the redirect. When I attempt to use
window.location.href = '/home'+ data;
, the message ends up concatenating with the URL. How can I achieve this without the message being added to the URL?