Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fingerprinting #1

Open
3rd-Eden opened this issue Sep 3, 2014 · 0 comments
Open

Fingerprinting #1

3rd-Eden opened this issue Sep 3, 2014 · 0 comments

Comments

@3rd-Eden
Copy link
Member

3rd-Eden commented Sep 3, 2014

Fingerprinting is a technique that transforms the filename in the HASH of the content, so when the contents of a file changes the file name changes as well. This allows you to set far future caching headers and when you update the contents of your file, a new file will be cached. So there is no need for version management.

Fingerprinting should be enabled by default. When you create a new file we should add the original file path to a list of aliases. So we can lookup the file paths and get the new name and URL location of the asset.

var Factory = require('sfs')
   , sfs = new Factory()
  , File = sfs.File;

y = new File(path);

sfs.get(path, function (err, paths) {
  /* paths should be an array */
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant