diff options
author | cash <cash.costello@gmail.com> | 2013-04-20 13:06:26 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2013-04-20 13:06:26 -0400 |
commit | feeac6824d6c61d98452432f252b6f66436d205b (patch) | |
tree | 689757b3b94666d75a972e27547a2cc9e0ad8c20 /mod | |
parent | 67982d671a69ea6251793dfbba26a2845987c6ce (diff) | |
download | elgg-feeac6824d6c61d98452432f252b6f66436d205b.tar.gz elgg-feeac6824d6c61d98452432f252b6f66436d205b.tar.bz2 |
caching embed js for one less http request when loading many pages
Diffstat (limited to 'mod')
-rw-r--r-- | mod/embed/start.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mod/embed/start.php b/mod/embed/start.php index 8a55cc5bb..fb6b8ac84 100644 --- a/mod/embed/start.php +++ b/mod/embed/start.php @@ -21,7 +21,9 @@ function embed_init() { // Page handler for the modal media embed elgg_register_page_handler('embed', 'embed_page_handler'); - elgg_register_js('elgg.embed', 'js/embed/embed.js', 'footer'); + $embed_js = elgg_get_simplecache_url('js', 'embed/embed'); + elgg_register_simplecache_view('js/embed/embed'); + elgg_register_js('elgg.embed', $embed_js, 'footer'); } /** |