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

No method of versioning javascript #722

Closed
jnolis opened this Issue Jul 23, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@jnolis

jnolis commented Jul 23, 2017

I'm currently having an issue with my site where if I make changes to the client-side F# and update the site, people who have viewed the site previously have problems because their browsers don't realize they need to recache the javascript files.

Currently, if I make changes to client side F# that gets compiled into javascript, my HTML refers to websiteurl.com/Scripts/Websharper/ProjectName.js. However, if I make changes to the client-side code that adjusts the functions input/output, then browsers viewing the website don't realize they need to recache ProjectName.js.

In reading about this, it seems that when getting the ProjectName.js file one could use query strings like websiteurl.com/Scripts/Websharper/ProjectName.js?version=4 to force a re-cache, but so far as I can tell there is no way in websharper to put a query string into the javascript file calls.

@granicz granicz added the proposal label Jul 23, 2017

@granicz

This comment has been minimized.

Show comment
Hide comment
@granicz

granicz Jul 23, 2017

Member

This is indeed a useful feature to have, and we have been considering ways to implement this. Curious, if you had a way to put a version flag on generated JavaScript files, how would you imagine those versions be generated/assigned?

Member

granicz commented Jul 23, 2017

This is indeed a useful feature to have, and we have been considering ways to implement this. Curious, if you had a way to put a version flag on generated JavaScript files, how would you imagine those versions be generated/assigned?

@jnolis

This comment has been minimized.

Show comment
Hide comment
@jnolis

jnolis Jul 23, 2017

jnolis commented Jul 23, 2017

@granicz

This comment has been minimized.

Show comment
Hide comment
@granicz

granicz Jul 23, 2017

Member

I think the hash can work. We also have to consider multi-project solutions with multiple WebSharper libraries and how to differentiate those from external libraries that might otherwise be referenced via CDN.

Member

granicz commented Jul 23, 2017

I think the hash can work. We also have to consider multi-project solutions with multiple WebSharper libraries and how to differentiate those from external libraries that might otherwise be referenced via CDN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment