demos/interactivity.js
/**
   * Adds a timestamp to the given URI to force IE 11 and Edge to bypass the cache and request a fresh copy of the CSS.
   * @param oldUri
   * @return {string}
   * @private
   */
Adds a timestamp to the given URI to force IE 11 and Edge to bypass the cache and request a fresh copy of the CSS.
@param oldUri
@return {string}
@private
Adds a timestamp to the given URI to force IE 11 and Edge to bypass the cache and request a fresh copy of the CSS . @param oldUri @return { string } @private
bustCache_(oldUri) {
    const newUri = oldUri
      .replace(/[?&]timestamp=\d+(&|$)/, '')
      .replace(/[?&]$/, '');
    const separator = newUri.indexOf('?') === -1 ? '?' : '&';
    return `${newUri}${separator}timestamp=${Date.now()}`;
  }
bustCache_ ( oldUri ) { const newUri = oldUri . replace ( / [?&]timestamp=\d+(&|$) / , '' ) . replace ( / [?&]$ / , '' ) ; const separator = newUri . indexOf ( '?' ) === - 1 ? '?' : '&' ; return ` ${ newUri } ${ separator } ${ Date . now ( ) } ` ; }
Adds a timestamp to the given URI to force IE 11 and Edge to bypass the cache and request a fresh copy of the CSS.
Adds a timestamp to the given URI to force IE 11 and Edge to bypass the cache and request a fresh copy of the CSS .
// Remove previous timestamp param (if present) // Remove trailing '?' or '&' char (if present)