Homec4science

Add timestamps to development-mode static resource URIs

Authored by epriestley <git@epriestley.com> on Feb 11 2013, 20:06.

Description

Add timestamps to development-mode static resource URIs

Summary:
When a developer changes CSS, it is normally sufficient to reload the page to get changes to show up, because browsers revalidate resources on reload.

However, if you reload the page and then an Ajax request adds new CSS to the page, this CSS does not trigger revalidation. The developer must currently clear their cache or re-run scripts/celerity_mapper.php webroot, to get this request to skip cache. We rarely use CSS over Ajax right now, so this hasn't cropped up much, but Conpherence does use this and clearing the resource is a big pain.

This seems to work fine normally, but I'm worried it might break some of the extra-celerity-resources stuff Facebook is doing.

Test Plan: In development mode, changed conpherence/message-pane.css and saw changes reflected on reload. Verified normal page loads do not cause additional HTTP requests. This change has no effect in production mode.

Reviewers: edward, vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T2428

Differential Revision: https://secure.phabricator.com/D4902

Details

Committed
epriestley <git@epriestley.com>Feb 11 2013, 20:06
Pushed
aubortJan 31 2017, 17:16
Parents
rPHca0d6aca1098: Add separate exception for when the repository clone is unreadable.
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1e74c05ac6ff: Add timestamps to development-mode static resource URIs (authored by epriestley <git@epriestley.com>).Feb 11 2013, 20:06