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

#38 - Use HTTP Headers from published datasets URL to retrieve versioning of the application #237

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

jrmartin
Copy link
Collaborator

Use HTTP Headers from published datasets URL to retrieve versioning of the application.

The SDS Viewer relies on published datasets published on this server, which is a large file. The application relies on downloading this file first to retrieve all the IDs of the published Datasets. Since it's a big file and it doesn't get updated every day, it's not necessary to download the file each time the application loads, so it's only downloaded whenever there are changes to the file.

In order to figure out if there are changes to the file, this PR does:

  1. Uses the above URL to retrieve its headers
  2. Uses the headers to determine the last date it was modified.
  3. Stores in browser's local storage a cookie with the Version Date and Datasets IDs.
  4. On each load of the application, the local storage version is compared to the one coming from the server's headers, if different then the Datasets IDs on local storage are updated as well as the version (date last modified).

This functionality existed prior to this PR, but it was manual versioning. This PR makes it so instead of versioning being manual, it uses the headers's last modified date as the versioning number.

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.

1 participant