[Jifty-commit] r4894 - in jifty/trunk: .
lib/Jifty/Plugin/CompressedCSSandJS lib/Jifty/Web
share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jan 21 01:17:57 EST 2008
Author: jesse
Date: Mon Jan 21 01:17:57 2008
New Revision: 4894
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS/Dispatcher.pm
jifty/trunk/lib/Jifty/Web/PageRegion.pm
jifty/trunk/share/web/static/css/base.css
jifty/trunk/share/web/static/js/jifty.js
Log:
r75284 at pinglin: jesse | 2008-01-17 09:45:05 -0500
* Deployment manual updates from Stanislav Sinyagin <ssinyagin at yahoo.com>
r75374 at pinglin: jesse | 2008-01-19 14:24:33 -0500
* Possibly making region inclusion display-neutral
r75462 at pinglin: jesse | 2008-01-21 01:16:24 -0500
* We somehow had dropped caching headers when we compressed css and js.
Modified: jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS/Dispatcher.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS/Dispatcher.pm (original)
+++ jifty/trunk/lib/Jifty/Plugin/CompressedCSSandJS/Dispatcher.pm Mon Jan 21 01:17:57 2008
@@ -41,8 +41,11 @@
return;
}
+
Jifty->handler->apache->content_type("application/x-javascript");
- Jifty->handler->apache->header_out( 'Expires' => HTTP::Date::time2str( time + 31536000 ) );
+ Jifty->handler->apache->header_out( 'Cache-Control' => 'max-age=259200, public' );
+ Jifty->handler->apache->header_out( Expires => HTTP::Date::time2str( time() + 31536000 ) ) ; # Expire in a year
+ Jifty->handler->apache->header_out( 'Last-Modified' => HTTP::Date::time2str($^T) );
# XXX TODO: If we start caching the squished JS in a file somewhere, we
# can have the static handler serve it, which would take care of gzipping
@@ -83,7 +86,9 @@
}
Jifty->handler->apache->content_type("text/css");
- Jifty->handler->apache->header_out( 'Expires' => HTTP::Date::time2str( time + 31536000 ) );
+ Jifty->handler->apache->header_out( 'Cache-Control' => 'max-age=259200, public' );
+ Jifty->handler->apache->header_out( Expires => HTTP::Date::time2str( time() + 31536000 ) ) ; # Expire in a year
+ Jifty->handler->apache->header_out( 'Last-Modified' => HTTP::Date::time2str($^T) );
# XXX TODO: If we start caching the squished CSS in a file somewhere, we
# can have the static handler serve it, which would take care of gzipping
Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm (original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm Mon Jan 21 01:17:57 2008
@@ -289,9 +289,9 @@
. qq|);\n|
. qq|</script>|;
if ($self->lazy) {
- return $result . qq|<div id="region-| . $self->qualified_name . qq|" class="lazy_region"></div>|;
+ return $result . qq|<div id="region-| . $self->qualified_name . qq|" class="jifty-region-lazy"></div>|;
}
- $result .= qq|<div id="region-| . $self->qualified_name . qq|">|;
+ $result .= qq|<div id="region-| . $self->qualified_name . qq|" class="jifty-region">|;
}
$self->render_as_subrequest(\$result, \%arguments);
Modified: jifty/trunk/share/web/static/css/base.css
==============================================================================
--- jifty/trunk/share/web/static/css/base.css (original)
+++ jifty/trunk/share/web/static/css/base.css Mon Jan 21 01:17:57 2008
@@ -60,6 +60,10 @@
float: right;
}
+div#jifty-region, div#jifty-region-lazy {
+ display: inline;
+}
+
div.warning {
Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js (original)
+++ jifty/trunk/share/web/static/js/jifty.js Mon Jan 21 01:17:57 2008
@@ -728,7 +728,7 @@
'.form_field .error, .form_field .warning, .form_field .canonicalization_note': function(e) {
if ( e.innerHTML == "" ) Element.hide(e);
},
- '.lazy_region': function(e) {
+ '.-jifty-region-lazy': function(e) {
var region = e.getAttribute("id").replace(/^region-/,"");
Jifty.update( { 'fragments': [{'region': region, 'mode': 'Replace'}]}, e);
}
More information about the Jifty-commit
mailing list