Caching and SSL

26 views
Skip to first unread message

Andrey

unread,
Oct 14, 2009, 6:20:36 AM10/14/09
to Google Web Toolkit
Hello!

I am using Tomcat with SSL and it seems that my GWT app is not cached.
I've read some posts here but still don't have clear understanding.

My questions are:
1. How can I check whether caching for my app is enabled or not?
2. Why GWT http headers contain "cache-control: no-cache" by default?
3. How can I change "cache-control" with Tomcat?
4. Why do we need caching-filters for tomcat? Isn't it enough to set
"cache-control", "max-age" and something else?

Maybe there is some kind of FAQ on SSL and caching?

Thanks in advance!

gwtfanb0y

unread,
Oct 14, 2009, 7:22:44 AM10/14/09
to Google Web Toolkit
Hello Andrey!

Why do you want to cache a SSL connection? For security reasons,
i would not recommend this.

What exactly do you want to cache - the GWT GUI or Database-Access?
Remember that the generated JavaScript is executed fully inside the
Client-Browser.

Regards,
gwtfanb0y

Austen

unread,
Oct 14, 2009, 7:39:13 AM10/14/09
to Google Web Toolkit
I believe that the no-cache issue is only a problem for IE?

Does this help? http://www.symphonious.net/2007/06/19/caching-in-tomcat/

Austen

Andrey

unread,
Oct 16, 2009, 2:36:42 AM10/16/09
to Google Web Toolkit
Hello!

I want to cache javascript (it is in .html files, right?). As I see
now in Forefox 3.5 application loads every time and it takes a lot, as
scripts are rather big.

Andrey

On Oct 14, 3:39 pm, Austen <awconsta...@gmail.com> wrote:
> I believe that the no-cache issue is only a problem for IE?
>
> Does this help?http://www.symphonious.net/2007/06/19/caching-in-tomcat/

Andrey

unread,
Oct 20, 2009, 4:46:51 PM10/20/09
to Google Web Toolkit
I found the answers.
If you use Tomcat, you can speed up your GWT app as follows:

Caching:
1. Turn off "pragma: no-cache" by adding:
<Valve
className="org.apache.catalina.authenticator.BasicAuthenticator"
disableProxyCaching="false" />
to your Context in server.xml

2. Add "Cache-control: public" and "Expires: ~1 year" to headers by
creating Filter as shown here:
http://www.infoq.com/articles/gwt-high-ajax

Compression:
3. Add
compression="force"
to your Connector in server.xml

Check your modifications with:
http://www.whatsmyip.org/http_headers/
http://www.whatsmyip.org/http_compression/

On Oct 16, 10:36 am, Andrey <mino...@gmail.com> wrote:
> Hello!
>
> I want to cache javascript (it is in .html files, right?). As I see
> now in Forefox 3.5 application loads every time and it takes a lot, as
> scripts are rather big.
>
> Andrey
>
> On Oct 14, 3:39 pm, Austen <awconsta...@gmail.com> wrote:
>
> > I believe that the no-cache issue is only a problem for IE?
>
> > Does this help?http://www.symphonious.net/2007/06/19/caching-in-tomcat/
>
> > Austen
>
> > On Oct 14, 11:20 am, Andrey <mino...@gmail.com> wrote:
>
> > > Hello!
>
> > > I am using Tomcat with SSL and it seems that my GWT app is not cached.
> > > I've read some posts here but still don't have clear understanding.
>
> > > My questions are:
> > > 1. How can I check whethercachingfor my app is enabled or not?
> > > 2. Why GWT http headers contain "cache-control: no-cache" by default?
> > > 3. How can I change "cache-control" with Tomcat?
> > > 4. Why do we needcaching-filters for tomcat? Isn't it enough to set
Reply all
Reply to author
Forward
0 new messages