Skip to content

Remove outdated timestamp for Dash assets #201

Description

@rpkyle

Dash for R still retains ?v= and &m= within utils.R, when serving fingerprinted assets via the _dash-component-suites handler:

dashR/R/utils.R

Lines 167 to 182 in 9c5a307

if ("script" %in% names(dep) && tools::file_ext(dep[["script"]]) != "map") {
if (!(is_local) & !(is.null(dep$src$href))) {
html <- generate_js_dist_html(href = dep$src$href)
} else {
script_mtime <- file.mtime(getDependencyPath(dep))
modtime <- as.integer(script_mtime)
dep$script <- buildFingerprint(dep$script, dep$version, modtime)
dep[["script"]] <- paste0(path_prefix,
"_dash-component-suites/",
dep$name,
"/",
basename(dep[["script"]]),
"?v=",
dep$version,
"&m=",
modified)

This has since been eliminated in Dash for Python. For the sake of parity, it should be excised from Dash for R also.

@Marc-Andre-Rivet

Activity

added this to the Dash Q2/2020 milestone on May 19, 2020
self-assigned this
on May 19, 2020

alexcjohnson commented on May 19, 2020

@alexcjohnson
Collaborator

FYI we still do use ?m= in dash Py for assets including favicon - I guess because we didn't get around to or couldn't figure out how to incorporate the cache-busting hash into the filename for items we're serving via flask.Blueprint

Shouldn't stop us from getting rid of all the query params on the R side since we're already parsing those urls ourselves but note that regex will need to change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions