RE: Gzip compression and caching system

2005-02-20 Thread gabriel l smallman
Found a solution:

http://www.markme.com/cantrell/archives/002658.cfm

I have just tested it with gzip'd content from db using the proper headers
Jochem suggested.. Whamo!

ContentType=text/html
Content-Encoding=gzip

gabe


>For compression, don't use Content-Disposition and Content-Type, 
>use Content-Encoding or possibly Transfer-Encoding. See RFC 2616.

>Jochem




~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195658
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Gzip compression and caching system

2005-02-20 Thread Pete Jordan
Jochem van Dieten wrote:

> That server has a broken HTTP implementation, it sends the full 
> page when I use a HEAD request.

That's the responsibility of the ColdFusion programmer; I confess that I 
rarely bother to code for it myself, but it's up to you to put in:

  

(after the , if there is one)

-- 
Pete Jordan

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195628
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Gzip compression and caching system

2005-02-20 Thread Pete Jordan
gabriel l smallman wrote:

> Issue is that this causes the browser to pop up a dialog how you want to
> handle this file type. So the browser appears to not automatically unpack
> ..gz extensions.

That's a browser-end issue if you're sending the MIME type correctly. 
You may need to force a .gz on the end of the URL for IE/Win though, as 
it has a nice habit of thinking it can guess what's wanted better than 
the server.

> If you want to see what I mean: http://icc.getfused.com:8300/gzip/test1.cfm

That does nowt here as of right now - empty document.

Pete Jordan


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195624
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Gzip compression and caching system

2005-02-19 Thread Jochem van Dieten
gabriel l smallman wrote:
> Issue is that this causes the browser to pop up a dialog how you want to
> handle this file type. So the browser appears to not automatically unpack
> ..gz extensions.
> 
> If you want to see what I mean: http://icc.getfused.com:8300/gzip/test1.cfm

That server has a broken HTTP implementation, it sends the full 
page when I use a HEAD request.


> 
>  SELECT name, content FROM table WHERE id=#id# 
> 
> 
> 
> 
> #foo.content#
> 
> 
> 

For compression, don't use Content-Disposition and Content-Type, 
use Content-Encoding or possibly Transfer-Encoding. See RFC 2616.

Jochem

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195554
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Gzip compression and caching system

2005-02-19 Thread gabriel l smallman
I would prefer not to, though this is better then making the os go find it
in directory with a zillion files in it.

-Original Message-
From: Russ [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 19, 2005 10:40 AM
To: CF-Talk
Subject: RE: Gzip compression and caching system

You could always save it to a temporary file right before serving it out... 


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195553
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Gzip compression and caching system

2005-02-19 Thread gabriel l smallman
Issue is that this causes the browser to pop up a dialog how you want to
handle this file type. So the browser appears to not automatically unpack
..gz extensions.

If you want to see what I mean: http://icc.getfused.com:8300/gzip/test1.cfm





 SELECT name, content FROM table WHERE id=#id# 




#foo.content#





~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195553
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Gzip compression and caching system

2005-02-19 Thread Dawson, Michael
I built a small, working test application that stored data in a SQL 2k
database and then pulled it back out.  It was very nifty.

If you would mail me off-list, I can try to find it later.  Right now,
I'm trying to figure out how to load a 591-column table in SQL 200x.  :(

BTW, don't let "them" tell you it's wrong to store files in a database
and that you should only store the filenames.  Many applications store
files in databases which makes them extremely portable and easy to
manage.  (I haven't ready any replies to your message, but those things
generally do come out.)

M!ke 

-Original Message-
From: gabriel l smallman [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 19, 2005 8:23 AM
To: CF-Talk
Subject: Gzip compression and caching system

Im working on a tag to wrap around content and then save it to a file,
gzip it and serve it out. Expanding on the cf_GZipPage custom tag.

But trying to take is a step further. I would like to save the gzip'd
binary data in the db. Main reason is the expected amount of gzipped
files could be well over 100k. I would prefer to not let the file system
handle finding and reading the data.

Issue is I cannot figure out how to read the binary data from the db and
serve it back out so the browser recognizes the mime type and encoding.
Right now the only way I can get it work is if I save the data to a file
and:

 

Anyone have an idea? Or am I stuck with reading it from a file?

gabe





~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195549
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Gzip compression and caching system

2005-02-19 Thread Pete Jordan
>Im working on a tag to wrap around content and then save it to a file, gzip
>it and serve it out. Expanding on the cf_GZipPage custom tag.
>
>But trying to take is a step further. I would like to save the gzip'd binary
>data in the db. Main reason is the expected amount of gzipped files could be
>well over 100k. I would prefer to not let the file system handle finding and
>reading the data.

The following is untried but should work... I'm assuming you have a name field 
in your table that can be supplied as a suggested filename to the user.


 SELECT name, content FROM table WHERE id=#id#





#foo.content#




Pete Jordan

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195547
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Gzip compression and caching system

2005-02-19 Thread Russ
You could always save it to a temporary file right before serving it out... 

-Original Message-
From: gabriel l smallman [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 19, 2005 9:46 AM
To: CF-Talk
Subject: Gzip compression and caching system

Im working on a tag to wrap around content and then save it to a file, gzip
it and serve it out. Expanding on the cf_GZipPage custom tag.

But trying to take is a step further. I would like to save the gzip'd binary
data in the db. Main reason is the expected amount of gzipped files could be
well over 100k. I would prefer to not let the file system handle finding and
reading the data.

Issue is I cannot figure out how to read the binary data from the db and
serve it back out so the browser recognizes the mime type and encoding.
Right now the only way I can get it work is if I save the data to a file
and:




Anyone have an idea? Or am I stuck with reading it from a file?

gabe





~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:195546
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54