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

UrlHelper assetTimestamp() completely missing it seems #7966

Open
dereuromark opened this issue Nov 28, 2024 · 0 comments
Open

UrlHelper assetTimestamp() completely missing it seems #7966

dereuromark opened this issue Nov 28, 2024 · 0 comments

Comments

@dereuromark
Copy link
Member

nook24
  10:30 AM
Hi, is there an option for the Cake\View\Helper\HtmlHelper::script() helper, to append a version like foo.js?V=1.2.3 or an other random string to avoid caching issues?

dereuromark
  [10:40 AM](https://cakesf.slack.com/archives/C053DPNGT/p1732786813118449)
Did you check the UrlHelper regarding assetTimestamp() function?


nook24
  [10:42 AM](https://cakesf.slack.com/archives/C053DPNGT/p1732786974717709)
You mean this? https://book.cakephp.org/5/en/views/helpers/html.html#changing-the-tags-output-by-htmlhelper

CakePHP - BookCakePHP - Book
[Html - 5.x](https://book.cakephp.org/5/en/views/helpers/html.html#changing-the-tags-output-by-htmlhelper)
The role of the HtmlHelper in CakePHP is to make HTML-related options easier, faster, and more resilient to change.


dereuromark
  10:44 AM
I guess the docs must be really bad about this one, the search wouldnt give it to you either
https://book.cakephp.org/5/en/views/helpers/url.html#namespace-Cake\View\Helper also doesnt
But then just check the source code :)

Usage of https://github.com/cakephp/cakephp/blob/33626a03197758f30a8ce8c2e0a75ed8ddbce40a/src/Routing/Asset.php#L239 in that context

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

No branches or pull requests

1 participant