John Mitchell Posts:2780


| | 02/15/2008 10:15 AM |
| I agree Dave. Right now I have another related problem on this site. When logged in as admin DNN puts duplicate links to some JS (some in the head and some not) which causes errors when I move the ones from the head to the bottom of the page. I don't like the multiple links and if your webserver is not configured right to send an expires header you also have to download those on every page request which really slows the page down for admins (plus all those images in the control panel).
So I'm working on a replacement rule that will fix the duplicate JS links problem. | | | |
|
lodani dani
 Posts:45

| | 02/15/2008 1:55 PM |
| Hi, a couple of questions
1) Should the Webresource.axd compressed by PB? YSlow shows it always not compressed with PB default settings
2) Is PB assigning the Expire Date to Js and css. Can this expire date be configured? everythings expires today and YSlow complaint that most files doen't have a "far future expires header"
thanks! | | | |
|
DavidWSnow
 Posts:162

| | 02/15/2008 2:45 PM |
| After looking at the YSlow componenys on my Home Page I have some questions: - Why isn't dnncore.js added into your new compacted, gzip'ed minified file?
- Is [script removed]
- I currently only get a YSlow score of D (61) which is an improvement, up from F (50)
- http request down from 27 for 440K to 20 for 372K
- Can I just gzip foo.js into foo.js.gzip and get all of these startic files to be gzip'ed? I bet it isn't that easy, but hope that you'll suggest some magic.
- I too am interested in Far Future expire dates. Some how I suspect that this is a DNN issue.
- I suppose the next thing for me to do is to combine the 4 icon/images I have in the middle of the page into one. That would be easy.
Things appear to be working well, /DaveS | doc | [script removed]http://www.agingsafely.com/ | | deflate | 41 | 10.7K (33.8K) | | | | js | [script removed]http://www.agingsafely.com/js/dnncore.js | | | 28 | 13.0K | "b48a891d1969c81:9dd4" | | | js | [script removed]http://s7.addthis.com/js/addthis_widget.php?... | | | 41 | 7.9K | "23376be82b145e8d8174ca21e191da38" | | | js | [script removed]http://www.agingsafely.com/DesktopModules/ListX/xListing.js?... | | | 34 | 24.0K | "028f592b250c81:9dd4" | | | js | [script removed]http://www.google-analytics.com/ga.js | | gzip | 58 | 7.8K (19.4K) | | | | css | [script removed]http://www.agingsafely.com/.../8f2d15314505b7361e52daee62ca9ee3.axd | 2/19/2008 | gzip | 44 | 5.8K (30.6K) | | | | css | [script removed]http://s7.addthis.com/css/addthis_widget.css | | | 28 | 0.7K | "157da8490acfc9b9cc5ac946fdaee4af" | | | cssimage | [script removed]http://www.agingsafely.com/Portals/_default/Skins/ASI-skin6/GradBlue04.png | | | 111 | 0.3K | "0a7e53b950c81:9dd4" | | | cssimage | [script removed]http://www.agingsafely.com/Portals/_default/Skins/ASI-skin6/GradBlue03.png | | | 124 | 0.3K | "0a7e53b950c81:9dd4" | | | cssimage | [script removed]http://www.agingsafely.com/Portals/_default/Skins/ASI-skin6/tabs/tab-left.gif | | | 123 | 1.7K | "0a7e53b950c81:9dd4" | | | cssimage | [script removed]http://www.agingsafely.com/Portals/_default/Skins/ASI-skin6/tabs/tab-right.gif | | | 137 | 5.2K | "0a7e53b950c81:9dd4" | | | image | [script removed]http://www.agingsafely.com/Portals/0/GrammySnow2.jpg | | | 968 | 164.7K | "0489247b950c81:9dd4" | | | image | [script removed]http://www.agingsafely.com/Portals/0/GrammySnow4.jpg | | | 820 | 113.6K | "0489247b950c81:9dd4" | | | image | [script removed]http://www.agingsafely.com/Portals/0/section_508.gif | | | 120 | 1.2K | "0a2f449b950c81:9dd4" | | | image | [script removed]http://www.agingsafely.com/Portals/0/pr2.gif | | | 116 | 0.2K | "075c348b950c81:9dd4" | | | image | [script removed]http://www.agingsafely.com/Portals/0/valid-xhtml10.png | | | 117 | 1.8K | "0a2f449b950c81:9dd4" | | | image | [script removed]http://www.agingsafely.com/Portals/0/vcss.png | | | 131 | 1.1K | "0a2f449b950c81:9dd4" | | | image | [script removed]http://s7.addthis.com/button1-bm.gif | | | 132 | 1.5K | "61c73a7a21a3d9013ec390335fdb2b97" | | | image | [script removed]http://www.agingsafely.com/Portals/0/ASI5-logo4.gif | | | 175 | 9.7K | "0489247b950c81:9dd4" | | | image | [script removed]http://www.google-analytics.com/__utm.gif?... | 8/4/1978 | | 112 | 0.03K | |
| | | |
|
John Mitchell Posts:2780


| | 02/15/2008 3:41 PM |
| Excellent questions. Yes, the WebResource.axd file should be compressed and set with a future expires date by PB. I'm not sure why it would miss it unless you are excluding all .axd files from PB.
Make sure that only ScriptResource.axd files are excluded. PageBlaster will do it's magic on CSS & JS that are not in the head section only if IIS has been setup to send those static files to ASP.Net, and PageBlaster has been setup in the web.config to process those extensions. I have the procedure for mapping additional extensions to ASP.Net using the IIS manager explained earlier in this thread. For "far future expires header", PB uses the disk interval time that you configure either in the global config or per page. I need to set the default to 4 days instead of one. If you don't want to, or don't have access to set static file mapping in IIS then you can still get other JS & CSS files processed by PB if you move them into the head section of the page. I have also attached another build of the DLL which corrects the problem I was having with JSMin. |
Attachment: 121541367371.zip
| | |
|
John Mitchell Posts:2780


| | 02/15/2008 4:21 PM |
| I have attached a new global config file that has the replacement rules to move all the DNN JS files to the head so they will get processed. It has to be accomplished with multiple rules because you can not create one rule to find all the DNN scripts and move them all at once because of how regex works, but I'm going to work on a search function that will concat all captures into a single string, so we'll be able to do it with one rule. |
Attachment: 1215214994871.zip
| | |
|
DavidWSnow
 Posts:162

| | 02/15/2008 4:45 PM |
| I have just discovered a GREAT new selling point for PageBlaster V3.0 that you haven't mentioned. It makes even crappy CSS W3C compliant! One of the side effects of your lumping them together in the a file with and extension other than CSS, is that W3C only validates the ones that it can see. You may just have made DNN W3C CSS compliant without ever having edited a line of css. . Seriously you eill want to mention in the manual that you might be surprised when you click on "view css" in Firefox's Web Developer Toolbar and there isn't any. I just fell into this trap and surprised myself. New users surly will be surprised and amazed. /DaveS | | | |
|
John Mitchell Posts:2780


| | 02/15/2008 4:48 PM |
| Hi Dave, I missed your question about gzipping foo.js into foo.js.gzip earlier. If I understand the question correctly the answer is no, you can't zip it up as a static file and put it on the server. The reason is that for Http Compression you have to send the correct headers to tell it the body of the response is compressed. If you zip it as a file before putting it on your server then it also puts it's own headers into the zip file so that it can be unzipped as a file later. For any Javascript you want to go through PageBlaster and then moved to the bottom of the page you only need to move it to the head though. Any CSS links that are in the head will also be optimized, and the merged link will stay in the head. | | | |
|
lodani dani
 Posts:45

| | 02/15/2008 4:51 PM |
| John,
With the new DLL and Config you just attached I tested again and the Webresource.axd is not compressed in my enviroment
I'm going to take some yslow screenshots with different scenarios | | | |
|
John Mitchell Posts:2780


| | 02/15/2008 4:58 PM |
| That's pretty funny Dave. I would probably get into trouble if I said it makes the CSS compliant, but "out of sight, out of mind" works for me.  Dani, You may want to turn on Debug tracing too, maybe it's getting an error. | | | |
|
green flash
 Posts:44

| |
DavidWSnow
 Posts:162

| | 02/15/2008 5:10 PM |
| I spent days editing DNN's and module CSS to get the typos out. Then I spent as much time writing PageBlaster rules to make most of my site both CSS and xhtml compliant. I check my site and other regularly with W3C. However, now I'll be checking mine much less often now that I will have to disable PB to check the CSS. /Dave | | | |
|
lodani dani
 Posts:45

| | 02/15/2008 5:23 PM |
| John, If I understand the log right the WebResource is not being compressed because there is not a TabID in the url? (...) 2/16/2008 12:17:36 AM PB:PageController:IsPageExcluded: Page Is Excluded: Url=http://dnn470/WebResource.axd?d=YAkFqNuSmtv2Zv5rrZDI0Q2&t=633241568437418000 ExcludeFrom=All ExcludePattern=\?(?!tabid)
16/02/2008 0:17:36 PB:PageController:IsPageExcluded: Page Is Excluded:
Url=http://dnn470/WebResource.axd?d=YAkFqNuSmtv2Zv5rrZDI0Q2&t=633241568437418000
ExcludeFrom=Compression ExcludePattern=\?(?!tabid)
16/02/2008 0:17:36 PB:PageController:IsPageExcluded: Page Is Excluded:
Url=http://dnn470/WebResource.axd?d=YAkFqNuSmtv2Zv5rrZDI0Q2&t=633241568437418000
ExcludeFrom=Replacements ExcludePattern=\?(?!tabid)
2/16/2008 12:17:36 AM PB:PageController:IsPageExcluded: Request automatically excluded.
Url: http://dnn470/js/dnncore.js
ExcludeFrom=Caching
ContentType: text/html, RequestType: GET, StatusCode: 200 , isUserCached: True, Pragma: no-cache | | | |
|
lodani dani
 Posts:45

| | 02/15/2008 5:38 PM |
| Looking in the debug file I saw this error. Now I understand why sometimes the CSS are merged together and sometime they don't. I don't know why the file is locked by another process but looks that is easy to reproduce: 1) IISReset 2) Load the page and the log shows that the css merge went ok 3) hit Ctrl+F5 2 or 3 times on the page and the log begins to show the error. (note: before and after the IIS reset the name of the locked file is always 054f320fd67738d5ebb79c898a799853.axd) The error 2/16/2008 12:26:20 AM PB:PageFilter.MergeCSS: Starting Merge of CSS File: C:\Users\Dani\Projectes\Dani\wwwrootdnn470\Portals\_default\Containers\Minimalist-Orange-Styles\Container08.css
2/16/2008 12:26:20 AM PB:PageFilter.MergeCSS: Completed Merge of CSS File: C:\Users\Dani\Projectes\Dani\wwwrootdnn470\Portals\_default\Containers\Minimalist-Orange-Styles\Container08.css
2/16/2008 12:26:20 AM PB:PageFilter.MergeCSS: Starting Merge of CSS File: C:\Users\Dani\Projectes\Dani\wwwrootdnn470\Portals\0\portal.css
2/16/2008 12:26:20 AM PB:PageFilter.MergeCSS: Completed Merge of CSS File: C:\Users\Dani\Projectes\Dani\wwwrootdnn470\Portals\0\portal.css
2/16/2008 12:26:20 AM PB:PageFilter.MergeCSS: Error writing merged CSS File :C:\Users\Dani\Projectes\Dani\wwwrootdnn470\DesktopModules\Snapsis\PageBlaster\Cache\CSS\054f320fd67738d5ebb79c898a799853.axd The process cannot access the file 'C:\Users\Dani\Projectes\Dani\wwwrootdnn470\DesktopModules\Snapsis\PageBlaster\Cache\CSS\054f320fd67738d5ebb79c898a799853.axd' because it is being used by another process. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at System.IO.StreamWriter.CreateFile(String path, Boolean append) at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) at System.IO.StreamWriter..ctor(String path) at Snapsis.HttpModules.PageBlaster.PageFilter.MergeCSS(String pageContent) | | | |
|
Host Account
 Posts:82


| | 02/15/2008 5:39 PM |
| That's strange. That Exclusion rule is supposed to exclude Urls that do not have a tabid, but only if they have a ? indicating a querystring, so yes, it should exclude that request. The weird part is that it is not happening on my site.
I'll dig deeper to find out why. | | | |
|
John Mitchell Posts:2780


| | 02/15/2008 5:45 PM |
| | I have also noticed that file access exception happening occasionally. When I was having the intermittent disappering CSS I changed the code so that if there were any errors it would "rollback" and not merge the CSS, but I still need to find out why it's getting a shared access exception. | | | |
|
John Mitchell Posts:2780


| | 02/15/2008 5:51 PM |
| Ooops. I now know why my WebResource.axd files are being compressed properly. For some reason I had taken that "no tabid" exclusion out of my config file. Try it without that rule. The main reason I had created that was because of ajax and WebResource calls, but I think with the new improvements it is not needed anymore. | | | |
|
lodani dani
 Posts:45

| | 02/15/2008 6:00 PM |
| It works! the webresource.axd is now compressed! thanks! | | | |
|
jens lewald
 Posts:40

| | 02/16/2008 7:40 AM |
| Hi, i think in latest version (or dll) the portal rule function will be brocken again. no rule defined in portal setup works. second i notice that the movement of js files will crash many function of my site.so i remove the movement rules in global config. i can´t remove the tabid rule because then my menue (is a special) didn´t work. how can i activate the compression of webressource.axd only? thanks jens | | | |
|
John Mitchell Posts:2780


| | 02/16/2008 8:24 AM |
| Hi Jens, The Portal Rules are working on this site and it has the latest DLL so I'm not sure what is happening on yours. If you turn on the Debug tracing it may give us a clue.
I'm actually working on the movement of the JS files to the head section today. For some reason they don't seem to be getting moved on this site, but it works on my local development so I need to track that down. One thing to keep in mind is the order can make a difference. When you use a rule to move the JS to the head it puts it at the end of the head section, and the next rule will move the next one to the head at the end, so you will want to move them in the same order that they are originally in the page. I think I did this, but that is another thing I will be confirming. Also, spmenu.js and maybe some others cannot be moved because they need to stay at the top of the page to allow the menu to be initialized during the page load. This is just another bad consequence of using a javascript menu like Solpart. This may not be the issue you are having, I just wanted to highlight what may be happening.
In regards to removing the \?(?!tabid) rule. Now that we are optimizing a lot more than the main page, that one needs to be removed. If it causes a problem with your menu then there is probably another exclusion pattern that can be used that is more specific to your problem. I can help you track that down if you want. If you install YSlow in FireFox it can really help us to see where the problem is, or you can just direct me to a page that has the issue. I can look at this page while it is working and probably find a better way to exclude whatever is causing a problem with your special menu. | | | |
|
lodani dani
 Posts:45

| | 02/16/2008 9:50 AM |
| John,
Using the latests Global Config file you posted yesterday I noticed that the SimpleGallery from ventrian module was not working : the thumbnails served by the ImageHandler.ashx are not displayed.
In the global file there is an exclusion rule for (.asxh) and this thumbnail generator uses the (.ashx) . I added the ashx to the config file and everythign works as expected. The question is, is that a typo in the global config file or I need to add both extensions? thanks, dani | | | |
|