How to Test Asset Caching?
Making sure that your game caches assets correctly, majorly improving loading times.
Game assets are automatically cached at Pley. Browsers automatically cache most files, but Pley ensures it works correctly and maintains functionality across browsers. Assets are cached by default when the game starts on the web.
1) Open the game site.
2) Open the developer menu in the browser.
Accessing web browser developer menus.
In Google Chrome, right-click (Windows) / cmd-click (MacOS), selecting "Inspect". This will open the developer console and tools.
In Firefox, Tools > Web Developer > Web Developer Tools.
CTRL+Shift+i
orF12
opens the menu on Windows in most browsers (Cmd + Opt + i
on Mac).
3) Click on the Network tab and refresh the game.
4) As the game starts up, all network communication will be recorded on the screen. At the bottom bar of the screen you can see # requests, transferred size, used resources, and recording duration.
5) If the "transferred mb" is lower than your total game size, the browser has cached the game assets and starting the game after the first time will be much quicker as no files need to be downloaded.
- During the first launch, files will be downloaded, and the transferred size will be large.
- During subsequent launches, the browser will cache files and the load will be much shorter and the transferred size will be small.
- If you clear your browser's files, run a privacy browser, or change your device/browser - the cache will be cleared and automatically re-downloaded when you start the game.
Updated 12 months ago