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

CLDR-13582 Make browser use most recent JavaScript files #406

Merged
merged 1 commit into from
Mar 31, 2020
Merged

CLDR-13582 Make browser use most recent JavaScript files #406

merged 1 commit into from
Mar 31, 2020

Conversation

btangmu
Copy link
Member

@btangmu btangmu commented Mar 25, 2020

-Use the query string method like survey.js?v=5f1f23b

-Change INCLUDE_SCRIPT_VERSION to true in SurveyAjax.java

-Comments

Checklist

-Use the query string method like survey.js?v=5f1f23b

-Change INCLUDE_SCRIPT_VERSION to true in SurveyAjax.java

-Comments
@btangmu btangmu self-assigned this Mar 25, 2020
Copy link
Member

@macchiati macchiati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the script property is null or empty. Is the result what you want? If so, fine, but just checking.

@btangmu
Copy link
Member Author

btangmu commented Mar 29, 2020

What happens if the script property is null or empty. Is the result what you want? If so, fine, but just checking.

Good question. CLDRConfig.getInstance().getProperty("CLDR_DIR_HASH") could return CLDRURLS.UNKNOWN_REVISION = "(unknown)" or null or empty string. (Let's assume those are all possible, to be safest.) The resulting queries would be "?v=(unknown)", "?v=null", and "?v=". I've just tested and confirmed that the JavaScript files are still loaded OK.

If CLDRConfig.getInstance() returned NULL we'd get a NullPointerException. That's true in many places where CLDRConfig.getInstance() is called.

I don't see a need for any change, do you?

@macchiati
Copy link
Member

macchiati commented Mar 29, 2020 via email

@btangmu
Copy link
Member Author

btangmu commented Mar 30, 2020

As long as the receiver discards the bogus values, np.

Right. The query string (everything from "?" on) only affects caching of the JavaScript. The only harm that can result from bogus queries like "?v=null" is that the browser (or a proxy) might use an outdated cached version of the file longer than we want, just as is already the case now when there isn't any query string.

@macchiati
Copy link
Member

macchiati commented Mar 30, 2020 via email

@btangmu btangmu merged commit 0366e26 into unicode-org:master Mar 31, 2020
@btangmu btangmu deleted the t13582_b branch March 31, 2020 20:53
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.

3 participants