Re: Compressing cache.html files

2011-02-12 Thread Syed Ali Saim
My point exactly, Its working without me doing any things, but my
*.cache.html files are about 1.05 MB, the initial loading takes a lil while.
And this is not automatically compressed by appengine. Can this be something
to do with appengine limit. Is there a way to compress cache.html files?

Once the cache file is download the app runs blazzing fast. But the initial
download will definitely translate into a loss of bandwidth from the daily
quota.

If I gzip the cache.html, the application is broken, as the reference is to
*.cache.html, and not to *.cache.html.gz

Any ideas?


On Fri, Feb 11, 2011 at 6:28 PM, Harald Schilly harald.schi...@gmail.comwrote:

 On Friday, February 11, 2011 1:22:58 AM UTC+1, Saim wrote:


 Accept-Encodinggzip,deflate


 I don't understand what you did, but I think you do not have to do
 anything. read this:
 http://code.google.com/appengine/kb/general.html#compression

 Just the quoted line from you above is enough to tell appengine to send the
 data compressed. Much more importantly, make sure that you tell appengine to
 set the cache time of those *.cache.html files to something like 356d and
 disable client side caching for non *cache* files!!! (i.e. *nocache* : 1s or
 so)

 please read this:

 http://code.google.com/appengine/docs/python/config/appconfig.html#Static_File_Pattern_Handlers

 h

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Compressing cache.html files

2011-02-12 Thread Syed Ali Saim
Well I guess code splitting might be the way to go.

Thanks




On Sat, Feb 12, 2011 at 7:52 PM, Harald Schilly harald.schi...@gmail.comwrote:

 Well, if I understand you correctly, I think you want to do something
 that's either not necessary or completely impossible.

 1. you cannot send a .gz compressed file to gwt - you need to tell the
 browser to decompress the file before it is visible in the javascript
 application.
 2. you have to compress the bytes that are sent on the wire when they are
 transmitted! that means, the type of the file is still text/html or
 something like that, not a compressed binary.
 3. this compression, afaik, is done automatically by appengine for static
 files. i suggest you to look at the raw datastream via a network dump
 program that reads all the tcp data that your browser receives (i.e.
 wireshark is a good one)

 4. to implement that yourself in appengine, you can do this:
 4.1 compress all files as .gz
 4.2 create an entry for a dynamic script that maps requests for each
 .cache.html files to the corresponding .cache.html.gz file. make sure to add
 the correct headers, so that the browser knows that it gets a compressed
 datastream. just sending the .gz file won't work.
 ... but i don't think you have to do that at all.

 5. what's probably more helpful, split your gwt application. read this
 about GWT.runAsync:
 http://code.google.com/webtoolkit/doc/latest/DevGuideCodeSplitting.html

 H

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Compressing cache.html files

2011-02-10 Thread Syed Ali Saim
Hi,
I have an application with django non-rel backend, and GWT front end. My
application front end files are statically served, and I am facing some
difficulty with compressing the content.

here is what my response header looks like in firebug
--

 Etagz4VwiA DateThu, 10 Feb 2011 22:33:12 GMT ExpiresFri, 10 Feb 2012
22:33:12 GMTCache-Control public, max-age=31536000Content-Type text/html
ServerGoogle Frontend Transfer-Encodingchunked
Request Headersview source
 Hostzzz.appspot.com User-AgentMozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) gzip Accept
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Languageen-us,en;q=0.5 Accept-Encodinggzip,deflateAccept-Charset
ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive 115Connectionkeep-alive Referer
http://zzz.appspot.com/EventPlannerClient/EventPlannerClient.html
 

*I tried gzip all the *.cache.html files, and I get the static file not
found 404.*

---*

However the django-admin interface is getting compressed with the following
response header. So this is not a proxy etc issue and I m not using any.*

--

 ExpiresThu, 10 Feb 2011 22:50:51 GMT VaryCookieLast-Modified Thu, 10 Feb
2011 22:50:51 GMTEtag7731e7b3a8924793a27622cb820bed95 Cache-Control
max-age=0 Content-Typetext/html; charset=utf-8Set-Cookie
csrftoken=5aa923e014c63c1b0ff6181d50e7c197;
expires=Thu, 09-Feb-2012 22:50:51 GMT; Max-Age=31449600; Path=/
sessionid=b10a8d259854ba944e1410b5a9c4a729;
expires=Thu, 24-Feb-2011 22:50:51 GMT; Max-Age=1209600; Path=/
Content-EncodinggzipDate Thu, 10 Feb 2011 22:50:51 GMTServer Google Frontend
Content-Length826
Request Headersview source
 Hostzzz.appspot.com User-AgentMozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) gzip Accept
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Languageen-us,en;q=0.5 Accept-Encodinggzip,deflateAccept-Charset
ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive 115Connectionkeep-alive


What am I doing wrong??

Any ideas?

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.