Closed (works as designed)
Project:
Javascript Aggregator
Version:
5.x-0.5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2008 at 02:26 UTC
Updated:
30 Jun 2008 at 18:05 UTC
With drupal_add_js you can add inline javascript such as
<script type="text/javascript">Drupal.extend({ settings: { "thickbox": { "close": "Close", "next": "Next \x3e", "prev": "\x3c Prev", "esc_key": "or Esc Key", "next_close": "Next / Close on last", "image_count": "Image !current of !total" } } });</script>
It would be nice if we could get those aggregated, too.
Comments
Comment #1
derjochenmeyer commentedHi FiReaNG3L, thanks or your idea! I thought about that, but i see some problems:
- the filename is generated by the set of .js files right now. we would have to figure out a way to include this information in the md5 value.
- the inline js code might be dynamic in some caes. if we dont take that into account we end up with problems, if we do we might have a new file created on every pageload which would make it a performance issue for the server maybe.
After all the main purpose is to redue the serverload and interaction. I think it makes no big difference if the code is inline or in a cached file. What would be the main benefit of caching inline js?
Comment #2
FiReaNGeL commentedI think you're right on both points, especially the dynamic JS one, which we have no easy way to detect. I can work around it by building a small JS file and drupal_add_js that instead, it will get aggregated just fine. Thanks for the awesome module!
Comment #3
redben commentedOr we can aggregate inline ! instead of having :
we can have