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

[Bug]: custom JS and CSS and cache refresh #2373

Closed
nboisteault opened this issue Jul 7, 2021 · 3 comments · Fixed by #2377
Closed

[Bug]: custom JS and CSS and cache refresh #2373

nboisteault opened this issue Jul 7, 2021 · 3 comments · Fixed by #2377
Assignees
Labels
Milestone

Comments

@nboisteault
Copy link
Member

nboisteault commented Jul 7, 2021

What is the bug?

When modifying a custom JS or CSS file for a project, modified files are not loaded until cache is refreshed (ctrl + F5).
Possible solution: file hash could be added as a URL parameter here : https://github.com/3liz/lizmap-web-client/blob/master/lizmap/modules/view/controllers/lizMap.classic.php#L397
PHP has this function : https://www.php.net/manual/en/function.hash-file.php

Steps to reproduce the issue

  1. Modify a custom asset, JS or CSS.
  2. Reload (F5) page
  3. Old asset version is loaded not new one

Lizmap version

3.4.4

QGIS desktop version

all

QGIS server version

all

Operating system

all

Browsers

Firefox, Chrome, Safari, Microsoft Edge

Browsers version

all

Relevant log output

No response

@nboisteault nboisteault added the bug label Jul 7, 2021
@nboisteault nboisteault added this to the 3.4.5 milestone Jul 7, 2021
@nboisteault
Copy link
Member Author

@laurentj What are your thoughts about this issue?

@nboisteault
Copy link
Member Author

Working on a PR.

@nboisteault
Copy link
Member Author

@laurentj you would prefer https://www.php.net/manual/fr/function.filemtime.php#81194 ? We have to take care the behavior is good for whatever OS.

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

Successfully merging a pull request may close this issue.

2 participants