5 ms·
It is. But then you open it in multiple tabs, because that's how people use websites. Unless I'm supposed to re-implement tabs within my single page applicatio
by dumbmatter 10y ago
It is. But then you open it in multiple tabs, because that's how people use websites.
Unless I'm supposed to re-implement tabs within my single page application and then force it to only let one tab run, which I guess is possible but horrible :)
- xigency 10y agoIf it opens in multiple tabs, then it isn't a pure SPA. (Relying on the browser tabs instead of tabs in your application.) If you have several tabbed views, then you would include tabs in your application.
- dumbmatter 10y agoIt is a pure SPA, you just have the option of opening multiple instances at the same time. Like I can open gmail in two tabs, but it's still an SPA. And yeah tabs in JS are possible and I might go down that route, it'll just be a lot of extra work to replicate a UI that already exists fine.
- xigency 10y agoHere's an example: http://orteil.dashnet.org/cookieclicker/ http://orteil.dashnet.org/cookieclicker/ Opening another tab creates a new bakery, not a view into the same bakery. (This only works if you haven't played before or clear your cookies.) Edit: If you really want to keep the same functionality then you would need to bring server communication into the mix. It's possible to either run the simulation server-side, or at least communicate the state between tabs using a server. If you send an email in one Gmail window and it shows up in the other window, then I would guess it receives a message from the server to update.
- TeMPOraL 10y agoThe point still being, with this change you can have only one tab doing server communication at "full throttle", which may kill whatever gameplay elements make the players open this game in multiple tabs.
- xigency 10y agoI'm not sure on the Chrome implementation, but I think all of the visible tabs would be foreground, not background. So the issue would be refreshing when changing tabs. (And also communicating between visible tabs).
- syrrim 10y agoThe last time I played, opening a new tab would create a view into the same bakery, but it each tab diverged based on RNG. This allows you to cheat by, for example, taking multiple risk free chances at wrinkler drops.