I am using window.location.replace for various things on an app and passing variables in the URL (www.website.com/?clicked=2).
The problem is that it absolutely floods the history with new entries (at least in Chrome). Is there a way to just have 1 entry for the page? I thought window.location.replace was supposed to replace the entry or so I have read?
Are there any other methods out there? If you use the app legitimately for like a minute clicking things, it will take up a page of history.
I do not think you can do that.
window.location.replacewill simply change an URL and reload page. As it is a different URL – it will be added to navigation history. Suppose the only thing you can do here – download full page with ajax. Little strange usage of ajax, but it will solve your problem with multiple entries in history. With things like History.js you can control what is in browser history, but page will be loaded with ajax anyway.