1.0.2 • Published 4 years ago

@nickgraffis/versionify v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Versionify

Simple scripts to create random versions for your scripts and css files to avoid your browser cacheing your changes during development.

Reason

I run into the issue on both Chrome and Safari that when running something like http-server to develop webpages with CSS and JS, the browser caches my files and does not update changes when I make them. There is a way with both browsers to stop this, but I never found a great way to really do this. My soultion was the create a new version of the files everytime the files were opened. This forces the browser to load the new version of the file.

Usage

<script type="text/javascript" src="https://raw.githack.com/nickgraffis/versionify/master/versionify.js"></script>

<script>
  scripts('your-file.js');
</script>
<script>
  styles('your-file.css');
</script>
1.0.2

4 years ago

1.0.0

4 years ago