lemankk / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Error fetching the correct cache #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify version: 2.1.4
PHP version: 5.2.6

What steps will reproduce the problem?
1. load enough resources so that the cache filename exceeds 250 characters, in 
IE8

Expected output:
No errors

Actual output:
Either 404 or wrong cache selected

Did any unit tests FAIL? (Please do not post the full list)

Please provide any additional information below. If this has to do with URI
rewriting, please include your DOCUMENT_ROOT, the

I have been using Minify successfully on production environments for about 3 
months, but recently have been caught with an error and Im afraid I couldnt 
reproduce it or log it.

On an specific computer in my client's network, IE8 will fail to load the 
minimified and cached content. This happens only in 2 machines and all 10 
computers have the exact same specifications and browser versions.

Given, formatting or changing pcs will solve the problem (I have managed to get 
my client to do so), but the error was intriguing and I was unable to reproduce 
or turn logs on on our production environment.

The most likely associated cause might be the character length in the cache 
filenames. 

Ive implemented minify to deal with a bad situation on our legacy sotware wich 
would load up to 50 (!) javascripts at mostly all times.
This have lead to the creation of huge filenames, and I wonder if some of them 
might be duplicated even if the scripts selected differ.

this is an example :

minify_common_funcs_v11,multidados,DOM_funcs_v2,jquery1.4.2.min,jqueryui1.8.4.cu
stom.min,jqueryuitimepickeraddon,jquery.jgrowl,dom_grid_v15,cookies,functions.js
_f9344026aab885072759e5ea2a040b68.gz

At this point I am forced to disable minimifying untill I can find the root 
cause. It will be specially dificult since it only happened on specific pcs, 
and my client will be quite unwilling to help me out with debuging.

If you could enlighten me, I would like the know if the development team 
contemplated any other procedures for the cache file name creation other then 
concatenating the resource names plus the md5. 

Ive tried some uuid methods (generating an UUID for a set of selected 
resources) but couldnt get it to work without some form of data storing, 
database or file based, and that wont work well for me too.

Original issue reported on code.google.com by rud...@gmail.com on 2 Feb 2011 at 5:33

GoogleCodeExporter commented 9 years ago
The list of filenames at the beginning of the cache filename is just to help 
users looking through their cache folder have an idea of what's in the file 
(the full length is limited).

What you're probably running into is IE's URL length limit, which is pretty 
short. Generally any list of this size should be put in the groupsConfig.php 
file so you can just use a URL like: /min/g=commonJs

Original comment by mrclay....@gmail.com on 2 Feb 2011 at 6:15

GoogleCodeExporter commented 9 years ago
Thanks a lot for the feedback

The resources loaded on different parts of our system are dinamically 
allocated, I couldnt use fixed group definitions, but managed to implement 
dynamic minify groups with a little session control.

Original comment by rud...@gmail.com on 3 Feb 2011 at 10:46

GoogleCodeExporter commented 9 years ago
It would be best for caching/performance if you could identify the common 
resources and place those in a static group. Putting everything in one combined 
request can be bad: changing one part of it means having to download the whole 
thing again, and the user has to wait for all that processing (the first time 
at least) on the server.

If you need more help, ask on the Google Group.

Original comment by mrclay....@gmail.com on 3 Feb 2011 at 12:49