Pebble App Framework: Phone API
    Preparing search index...

    Function cacheBust

    • Adds a query param that changes on every call, so no HTTP cache between the phone and the provider can hand back an old reply. Providers ignore the extra param.

      The stamp goes before any #fragment, since nothing after the # reaches the server. A signed URL, such as an S3 presigned link, is refused once the stamp changes its query. That costs a feed served that way, where skipping the stamp would bring back the stale copies it is here to beat, and the feeds calendars hand out are not signed.

      Parameters

      • url: string

        The URL to fetch.

      • nowMs: number

        The time to stamp it with, normally Date.now().

      Returns string

      The URL with its _= stamp added.