From feeac6824d6c61d98452432f252b6f66436d205b Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 20 Apr 2013 13:06:26 -0400 Subject: caching embed js for one less http request when loading many pages --- mod/embed/start.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/embed') 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'); } /** -- cgit v1.2.3