Jump to content

how to start States on demand?


plicatibu
 Share

Recommended Posts

Why don't you just download the assets needed for them just when they are needed? Create separate load state to load assets specific to those states. I do not think you could download more JS code and then execute it, it would be a security nightmare for web browsers to allow such things. But may be there might be a way to download JS files of those states in a variable and then eval it lol :lol: But ultimately, it'll hardly save you few KB.

Link to comment
Share on other sites

Thanks for replying.

I already separated assets in different states. But I'd like to avoid downloading unneeded states upfront  because many places here in Brazil you have 2G connection only. It could make a big difference for those using such slow Internet connections.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...