Initial Load and Reloading a Closed Window, Help Please!

Started by
3 comments, last by Wyrframe 5 years, 10 months ago

I am considering writing a JavaScript browser game that uses three windows.  What I am wondering is after the initial load of the game will the web pages be ready and therefore quick enough for any user.  One problem would be that the third window would open and close so does this mean that there is a necessary reload of that seperate third window page code and images by the browser that would slow it down?

 

Thank you; it would be a fun project,

Josheir

Advertisement

It really depends on the browser, and the server settings.

In general, you can expect most unchanged resources to be cached by the browser (at least for some period of time) assuming the server is correctly configured to do so.

 

Assuming the resources are available in the cache, page load should be almost instantaneous.  Anything that needs to be loaded from database or filesystem may introduce delays.

- Jason Astle-Adams

probably best not to have it play in 3 separate windows... Browsers tend to frown on that stuff these days anyways. Try pseudo-windows?

If you must use separate browser windows (which is not suggested; use panels, flows, or UI components within a single page if at all possible), try having any "secondary" windows load just an empty page, with no linkage to any external JavaScript either; just a link to your stylesheet, and a JavaScript callback that calls `window.opener.NotifyPopup(document);` or the like; Have the code which opened that window populate the notifying window's DOM remotely. That should minimize initial load time, and help accrete the responsibility for popup's behaviour into one runtime space.

RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement