Quick Nav:  Online Store   |   Login | Register

Enabling the StaticFileHandler

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
John Mitchell
Posts:2779


02/18/2008 5:45 PM  


 

To enable the Static File Handler for CSS and/or JS or images you will need to setup your application in IIS so that requests for these files are sent to the ASP.Net framework.
I have attached a couple images to this post to show how that is done.  Along with the IIS Setup you will also need the following line added to your web.config in the httpHandlers section.  PageBlaster adds this line to your web.config automatically if you have installed version 3.x.

<add verb="*" path="*.css,*.js,*.jpg,*.gif,*.png" 
type="Snapsis.HttpModules.PageBlaster.StaticFileHandler, Snapsis.HttpModules.PageBlaster"/>





Ari Doucette
<100 Posts
Posts:58


02/21/2008 11:27 AM  

What is the benefit of sending these to the static file handler? Is there a downside to this?

John Mitchell
Posts:2779


02/21/2008 11:16 PM  

Hi Ari,

Excellent question. The benefit comes from PageBlaster being able to do caching, compression, and replacements on JS & CSS, and if you configure it to handle images it will also strip the ETag header and add expires headers for those files as well.  Expires headers are what is needed to make the files stay in the cache on the user's browser and keeps the browser from having to make several requests just to find out the files have not been changed.

You can set expires headers directly in IIS, and you can also do compression if your server is setup for it, but some people can't do that at the server level.

The downside is that sending these static files to ASP.Net and letting PageBlaster handle them may be a little slower than IIS on the first request, but it really helps to optimize  how they are stored at the client.

Sending them to PageBlaster also allows you to configure the expire times by page where if you do it in IIS it is for the whole site.

You can learn more about these optimizations here: http://developer.yahoo.com/performance/rules.html

 

 

Ari Doucette
<100 Posts
Posts:58


02/22/2008 5:23 AM  

Thanks, John.
The link at the end of your prev post should have an html extension instead of htm.
It sounds like it is beneficial to let PB handle this instead of configuring it in IIS.
I'm looking forward to the new pageblaster for this and other reasons.
Will there be a step-by-step document with it explaining the performance enhancing options and how to use them? I ask b/c there seem to be so many of them covered in the forums here.

John Mitchell
Posts:2779


02/22/2008 7:16 AM  
Thanks Ari,
Yes, I will be working on PageBlaster documentation and tutorials this weekend.
The reason you are seeing a lot of it here in the forums is I have been describing the new functionallity for everyone who is beta testing.

Send me an e-mail if you want to get in on what I hope is the last build of beta testing.
Ari Doucette
<100 Posts
Posts:58


02/22/2008 7:34 AM  
Thanks John,
I've been following the beta testing threads and am getting more excited for the release with each new feature I see listed there.
I should probably wait for the release to begin our testing of it, though.
It sure will be nice to serve most of the unauthenticated pages up as static html from cache! Javascript, css and image caching will be awesome, as will be the repalcement rules and moving css to the top and js to the bottom.
Really looking forward to it.
Ari
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Enabling the StaticFileHandler



ActiveForums 3.7
Powered by: Snapsis Software