Gzip compression using IIS6.0 for files without an extension - gzip

Has anyone managed to activate Gzip compression on a website in IIS6 ?
We're using Castle Monorail (it's very nice btw) and as a result have clean RESTful URLs with no extensions.....
..... and there's the rub -> as far as we can see we need extensions on our endpoints to allow gzip compression.
It seems the only way out is our own HTTPModule - does anyone else know of any other way ??
Cheers
ian

Well I've found one way... it's a combination of the HTTPModule technique and Monorail filters.
So the article above by Rick Strahl is one of a number on the web that demonstrate using gzip / deflate compression. Lovely. Using these techniques with the a Monorail TransformFliter should work very nicely.
Any other ways, or still got to craft code ?

This is a great walk-through on enabling gzip compression in IIS6:
http://engineering.leads360.com/post/9301650692/http-compression-gzip-on-iis-6

Related

Apache to NGINX Migration - Mime Magic Alternative

I'm using nginx/1.10-3 and apache2-2.4.25-3 on Debian.
For many reasons i won't go into, I'm looking to switch to NGINX from Apache2.
My CMS has many files that either have no extensions, or have the wrong extension in terms of lining up with mime.types.
With Apache2 we rely on mod_mime_magic to override the extension and use the magic bytes to correctly set the content-type. However, I can't seem to find a way to get this on NGINX.
For example, we have images that end in .img and some files with no extension at all.
The only solution I can come up with, is to integrate extension rewriting/adding into the platform and change the extensions on upload and go through the existing ones. This will take a lot more time, though.
Is there a "hack" or an alternative to mime magic with NGINX?
Thanks

How do I set content negotiation for .jsonld files and .html?

I'm developing a Linked Data application and I need to use 303 URIs for my dataset. Currently, I have a dataset of 22500 .jsonld files with URIs as follows:
http://example.com/project/resource/file.jsonld
And I want to redirect browsers looking for text/html content to:
http://example.com/project/page/file.html
Which are not semantic files, so they are more readable.
Does anyone know how can I do this with Apache 2.4.10? I've been considering the type-map files, but I was wondering if there are another more efficient solutions than creating 22500 .var files.
Look at W3C: Best Practice Recipes for Publishing RDF Vocabularies. Although it is about publishing vocabularies, it lists a number of recipes for configuring content negotiation on Apache that apply equally to datasets.
The other key documentation for doing this is Apache Module mod_rewrite.

WCF service with gzip compression configuration (server/client)

I got few questions regarding to gzip compression in my self hosted WCF service.
I implemented a custom gzip compression (using the msdn sample) and everything works o.k. (requests/responses are all well compressed).
currently the client config includes all the additional configurations for using the compression (bindingElementExtensions, policyImporters pointing the gzip encoder binary etc.).
Actually i thought that the client doesn't need any external configuration for using the service and only need to have "gzip" mentioned at the "Accept-Encoding" and "Content-Encoding"...
how do i configure my client to work that way ? i want my client to handle an encoded message if he gets one only...
Another question - is that possible to set a minimal size of message which the gzip compression will encode starting from that size only? the motivation is for optimizing the server's load and prevent a unneccessary compression of small messages.
or is it using the gzip compression or not using it at all?
Thanks in advance!!!

Speeding up site using gzip and far-future expiration dates

I recently deployed a site http://boardlite.com . One of the tester websites http://www.gidnetwork.com/tools/gzip-test.php suggests that gzip is not enabled for my site. YSlow gives an A grade for Gzip but does not mention that gzip is on.
How do I make sure the site properly implements Gzip. I am also going to enable far-future expiry dates for static media. I would like to know if there are any best practices for setting the expiry date.
Static media on the site is served by nginx server while the site itself runs on top of apache, just in case if this information is required.
I'd advise against going too far into the future or you'll make site upgrades a nightmare. I believe a week should be enough since after that you'll still only be serving 302 responses not the whole image.
It looks like Gzip is enabled on your server. You can tell by checking the HTTP response headers for 'Content-Encoding: gzip'.
I can't think of any "best practices" for future expiry dates - other than to make sure they're not in the past ;)
There are many other ways you can optimize your web site. Spriting your CSS background images and using a content delivery network for your static content are a few.
Andrew

Can I serve a ClickOnce application with Apache?

We're testing our ClickOnce deployed application internally on IIS (Internet Information Services), but we're wondering if we can deploy it to the wider internet using Apache on Linux so we can make use of our existing external website host.
If so, is there anything else I need to consider other than as specifying the correct mime types such as .application and .deploy?
I found a number of people asking the same question starting around 2005, but here is the first google result - also discusses silverlight.
http://software.clempaul.me.uk/articles/clickonce/
As far as I can tell, however, the only thing you would need to worry about would be setting up the mime types and providing access to the files.
The Paul Clement article is the best description I've found. I also came across a topic in the Apache documentation that suggests putting the configuration in the httpd.conf file instead of .htaccess files. Here are the lines I added to my httpd.conf file:
AddType application/x-ms-application .application
AddType application/manifest .manifest
AddType application/octet-stream .deploy