Quick Nav:  Online Store   |   Login | Register

Merged JS and CSS?

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
Will Strohl
<100 Posts
Posts:88


07/02/2008 9:35 AM  

I have upgraded and finally gotten PageBlaster v3.03.02 working just the way we want it (mostly).  I am now on a mission to use to to lower our Code to Content ratio, and number of objects downloaded, code clean-up, and code compression (condensing).

Here is something I noticed after enabling the static file handler, and sending all CSS and JS files to the ASPNET ISAPI.  (I didn't do a wild card, I just sent those files through explicitly.)  Although I have uncommented the rules that move the DNN JS files to the header, they are not merged.

Also, when I look at the HTML output (especially on a site like Pingdom, I can see that there are still a large handful of script files that are not merged.  However, they are not JS, they are AXD.  The same goes for the CSS files.  What can I do to get those files to all merge?

Will Strohl
<100 Posts
Posts:88


07/02/2008 10:23 AM  
I also just noticed that two of my CSS files that belong to a 3rd Party module are also not Merged. However, the only rule I have that even has "css" in it right now is this:

< path pattern="\.js$|\.css$|\.html$" excludeFrom="Replacements" />
John Mitchell
Posts:3353


07/02/2008 10:43 AM  
The merge process only merges .JS or .CSS files that are in the head section. .axd files are not merged even if they contain javascript, because they start out as a virtual file and PageBlaster has to do a separate request on the server to make those static files and optimize them.

To get additional CSS links merged in you need to do rules similar to the JS move to head rules.

If you already had everything running and now are optimizing further, then you'll want to clear the complete PageBlaster cache to make sure you are starting the processing from scratch. That may be the reason the JS files that are moved to the head were not merged in.
Also those "move to head" rules for the JS files only happen for unauthenticated users. That is because DNN has some conflicting namespaces in the JS which cause problems for the Action menus when you are logged in if those files are merged.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.



ActiveForums 3.7
Powered by: Snapsis Software