Search code examples
google-cast

Chromecast: How to clear receiver cache


How do you ensure that the receiver is using the latest code deployed to the whitelisted url? Sometimes it appears to be using cached code.


Solution

  • There are two things you can do that should prevent it from caching:

    1) With the receiver running in debug mode, visit your.chromecast.ip.address:9222 and load the developer tools. Click the 'settings' button (the gear) in the bottom-right of the dev tools window. In the settings pane, make sure the 'disable cache' box is checked.

    2) In your receiver app, add a reference to a cache manifest:

    <!DOCTYPE html>
    <html manifest="cache.manifest">
    <head>
    <script src="https://www.gstatic.com/cast/js/receiver/1.0/cast_receiver.js">
    </script>
    .....
    

    And a cache.manifest file that tells the chromecast's browser not to cache anything:

    CACHE MANIFEST
    
    # Cache manifest version 1.0
    
    CACHE
    
    #no cache
    
    NETWORK
    *