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

How to use URI that incorporates cache ID? #3

Closed
rotorz opened this issue Aug 17, 2011 · 1 comment
Closed

How to use URI that incorporates cache ID? #3

rotorz opened this issue Aug 17, 2011 · 1 comment

Comments

@rotorz
Copy link

rotorz commented Aug 17, 2011

Given an array of stylesheet or javascript includes, how can I update cache and retrieve ID so that they can be included like below?

(when gzip is supported)
<link href="/min/cache/904c0ffe0aa5d4cac486e49803aa6eb5.gz" type="text/css" rel="stylesheet" />
or
<link href="/min/cache/904c0ffe0aa5d4cac486e49803aa6eb5" type="text/css" rel="stylesheet" />

There are several motivations for this approach:

  • obfuscate URIs
  • shorter URIs

Would the performance penalties of this approach be too significant?

Many thanks

@mrclay
Copy link
Owner

mrclay commented Aug 17, 2011

This usage (linking to server-cache files) is not recommended for a number of reasons. For generating HTML, you might want to look at min/utils.php.

@mrclay mrclay closed this as completed Aug 17, 2011
glensc pushed a commit to 0m3r/minify that referenced this issue May 14, 2022
Deprecated Functionality: preg_split(): Passing null to parameter mrclay#3 ($limit) of type int is deprecated

https://www.php.net/manual/en/function.preg-split.php#refsect1-function.preg-split-parameters

limit:

If specified, then only substrings up to limit are returned with the
rest of the string being placed in the last substring. A limit of -1 or
0 means "no limit".

Refs:
- https://www.drupal.org/project/geshifilter/issues/3262325

Signed-off-by: Elan Ruusamäe <glen@pld-linux.org>
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