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

How are js files merged? #621

Open
alexiskattan opened this issue Apr 21, 2014 · 5 comments
Open

How are js files merged? #621

alexiskattan opened this issue Apr 21, 2014 · 5 comments

Comments

@alexiskattan
Copy link

I'm making a small change to one js file. In development mode everything is fine. However, when I push it to the server, even if a file is changed, the merged files are still getting the same name.

So even after a file is changed there production server is still serving:

<script type="text/javascript" src="/javascripts/cache_123.....123.js"></script>

So people have to clear their cache to get the new update, which is hard to explain...

In production.coffee I have:

app.enable 'merge javascripts'

Is there a way to less aggressively cache? Or a way to make it change the file name on every push?

@anatoliychakkaev
Copy link
Collaborator

Nope, it's not implemented at the moment. The fix is simple by the way: we
should calculate cache name based on filename and mtime, not just filename.

On 21 April 2014 06:45, alexiskattan notifications@github.com wrote:

I'm making a small change to one js file. In development mode everything
is fine. However, when I push it to the server, even if a file is changed,
the merged files are still getting the same name.

So even after a file is changed there production server is still serving:

<script type="text/javascript" src="/javascripts/cache_123.....123.js"></script>

So people have to clear their cache to get the new update, which is hard
to explain...

In production.coffee I have:

app.enable 'merge javascripts'

Is there a way to less aggressively cache? Or a way to make it change the
file name on every push?


Reply to this email directly or view it on GitHubhttps://github.com//issues/621
.

@alexiskattan
Copy link
Author

It would be awesome if this is fixed. There are some issues that keep coming up with regards to it.

@sagish
Copy link

sagish commented Oct 11, 2014

+1 on this, users do not get update CSS or JS in production unless they activley refresh the page

@alexiskattan
Copy link
Author

omg. thank you.

@alexiskattan
Copy link
Author

@anatoliychakkaev would it be possible to push this version to npm soon? Thank you so much again for the platform it is really wonderful.

jfremy pushed a commit to jfremy/compound that referenced this issue Feb 26, 2015
…estamp to prevent outdated merged cache, fixes 1602#621
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

Successfully merging a pull request may close this issue.

3 participants