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

Meteor file hash extraction without query string #18

Closed
wants to merge 1 commit into from

Conversation

dhamaniasad
Copy link

In Meteor, the hash of the file bundled JS and CSS files is included in the URL path as http://localhost:3000/{hash}?meteor_js_resource=true, instead of as a query string ?hash={hash}.

I'm not sure if this is the best way to do it, but the previous service worker does not work with Meteor apps I tried using it with, and these changes make it work.

@ilan-schemoul
Copy link
Owner

Well you're right hash detection on bundled version is different on that the dev version so if you frequently update the server version user has multiple js versions where all but one are useless. This issue should be addressed in the future to optimize cache. But the way you've done it would stop proper caching handling on localhost version (if you just meteor multiple JS files are served with ?hash=[HASH]) so dev will have thousands JS files (as we reload a lot and JS files are split) which would most likely not be a good idea at all.
Very interesting concern for the next update thanks a lot to you !

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 this pull request may close these issues.

2 participants