Skip to content
This repository has been archived by the owner on Aug 5, 2019. It is now read-only.

filerev and cache-control headers #19

Merged
merged 10 commits into from
Aug 18, 2015
Merged

filerev and cache-control headers #19

merged 10 commits into from
Aug 18, 2015

Conversation

jrit
Copy link
Contributor

@jrit jrit commented Aug 18, 2015

@vokal/web this one should be merged and released before dominatr. I don't have a project open to test the deployment on, if anyone has an opportunity to pull from my fork so they can test, that would be helpful.

Concept here is that we should be using far future cache-control headers for static assets, but to do so we have to version every static file. grunt-filerev creates a hash of the file, so as long as the contents don't change, it won't be necessary for the client to fetch a new file, which is on its own a improvement from our current cache busting strategy. filerev-replace does the work of regex replacing paths to those versioned files.

@@ -1,18 +1,20 @@
{
"name": "dominatr-grunt",
"version": "3.0.0",
"version": "3.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If someone goes from 3.0.0 to 3.1.0 and makes no changes to their codebase, versioning will break, yeah? Maybe keep the version bit in replace.js and mark it as deprecated, if you don't want to jump straight to v4 here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess it should be v4 then, all those ?v={{ VERSION }} strings should really be removed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general we should get better about making non-destructive changes and deprecating things, tho.

@jrit
Copy link
Contributor Author

jrit commented Aug 18, 2015

updated

@@ -24,12 +24,22 @@ require( "load-grunt-config" )( grunt, {

## Changelog

#### 3.1.0 Cache and versioning changes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v4

Also, consider adding a "breaking changes" subheader to the majors in this list, I appreciate those on other changelogs.

@jrit
Copy link
Contributor Author

jrit commented Aug 18, 2015

betterer?

@Tathanen
Copy link
Contributor

Oh well I meant like in the angular changelog, they have a "breaking changes" subheader that list the specific breaking changes. Our "to upgrade" instructions kind of do that now, but only kinda, since we list how to upgrade for anything we changed, whether it was breaking or not.

@jrit
Copy link
Contributor Author

jrit commented Aug 18, 2015

We generally release such small change sets that there is one change in each and it is either breaking or not. I feel like the additional clarification isn't needed unless the change set is large enough that someone might only run into an issue under certain situations.

@Tathanen
Copy link
Contributor

LGTM. Lemme throw it on partyslate-marketing real quick, I'll let you know if it works.

@jrit
Copy link
Contributor Author

jrit commented Aug 18, 2015

Merging, nobody else use this until @Tathanen has signed off.

jrit added a commit that referenced this pull request Aug 18, 2015
filerev and cache-control headers
@jrit jrit merged commit e98ef9f into vokal:master Aug 18, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants