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

[ACA-4202] - forcing firefox to ignore cache when document version ha… #6807

Merged
merged 2 commits into from
Apr 9, 2021

Conversation

VitoAlbano
Copy link
Contributor

…s changed

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x")

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation
  • Other... Please describe:

What is the current behaviour? (You can also link to an open issue here)
Only for Firefox whenever the user updates a new version with the same name of a doc document whilst viewing it, the document is not refreshed but it's taken from the FF cache.

What is the new behaviour?
Whenever a new version steps in, we set the header of pdf-js to 'no-cache' and this will force the browser to actual fetch the new version

Does this PR introduce a breaking change? (check one with "x")

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Other information:
https://alfresco.atlassian.net/browse/ACA-4202

@@ -212,6 +212,7 @@ <h2>{{ 'ADF_VIEWER.LOADING' | translate }}</h2>
[blobFile]="blobFile"
[urlFile]="urlFileContent"
[nameFile]="displayName"
[cacheType]="cacheTypeForContent"
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need a new input? or we can add it always?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due the fact that this affects the caching for when we get the file it might be better to have a flexible strategy. Maybe the no-cache is something that makes sense for us but not in some other cases when the viewer is used.

@VitoAlbano VitoAlbano force-pushed the dev-valbano-ACA-4202-firefox branch from 4347975 to 3221f22 Compare March 24, 2021 22:47
@VitoAlbano VitoAlbano force-pushed the dev-valbano-ACA-4202-firefox branch from 3221f22 to 1fe6e15 Compare April 7, 2021 09:27
@VitoAlbano VitoAlbano requested a review from eromano April 7, 2021 09:27
@eromano eromano merged commit f9a7836 into develop Apr 9, 2021
@eromano eromano deleted the dev-valbano-ACA-4202-firefox branch April 9, 2021 10:44
TomikaArome pushed a commit that referenced this pull request Apr 9, 2021
#6807)

* [ACA-4202] - forcing firefox to ignore cache when document version has changed

* fxed lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants