Quick Nav:  Online Store   |   Login | Register

Put JS at bottom rule

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
eureka
<100 Posts
Posts:91


04/10/2008 4:06 AM  

Hi John

I am looking to move javascript files (3rd party) to the bottom of the page.  How could I achieve this with PageBlaster?

Thanks

Lynn


www.drivewaydesign.eu For A Dream Driveway

www.a2zdom.com Domain name matters


John Mitchell
Posts:3238


04/10/2008 7:53 AM  
Hi Lynn,

If you move the link to the head section then they will be included in the merge process and the link to that file is placed at the bottom.
If you look in the default.config file in DesktopModules/Snapsis/PageBlaster/Config you can see how I moved some of the core DNN links to the head so that they would be merged.

If you need more specific help, you can point me to a page and let me know what you want merged. Or you can save the page as a file and attach it here.
eureka
<100 Posts
Posts:91


04/10/2008 10:46 AM  
Hi John

I uncommented the in my.config web file and FTP'd it to the site root of the two portals which you had fixed yesterday. Using YSlow I found that the performanced had improved - the JS was put at the bottom - the css at the top. They achieved an improved performance rating of C (78) which still need to be improved further.

However, I tried this on http://luzzucruises.com/ and it had the opposite effect. The performance dropped to rating F(51)- the css was not at the top – js not at the bottom. I would like to merge js and css files and generally improve performance.

I had a look at your default.config you have several rules commented out e.g. Move dnn js links to Head - Move dnn.Controls inits to bottom. Do you recommend that I put these rules into my Snasis.PageBlaster.config Or do you have another suggestion?

Thanks
Lynn

www.drivewaydesign.eu For A Dream Driveway

www.a2zdom.com Domain name matters


John Mitchell
Posts:3238


04/10/2008 11:18 AM  
Yes, you should also use those rules that move the DNN JS links. They are commented by default in case there is problems, but it should work smoothly.

C(78) is actually pretty good and it is hard to get much higher if you have a lot of images, or external linked js files (like google analytics) etc.

To make it even better you need to enable the static file handler and then tell your host ;) that you want a wildcard mapping to asp.net so that the static files will be processed by PageBlaster.
eureka
<100 Posts
Posts:91


04/10/2008 1:01 PM  

Hi John

I added the rules in my Snapsis.PagePlaster.Config file  (see attached ) and FTP'd it to the root.  The extra rules do not appear to have caused a problem so far.  I tested the site with YSlow and found that the performance had dropped even more to F (49).

Thanks

 

Lynn


www.drivewaydesign.eu For A Dream Driveway

www.a2zdom.com Domain name matters


John Mitchell
Posts:3238


04/10/2008 1:09 PM  
I get C(79) on driveway, and C(78) on a2z

Also take out the excludes for MergeCSS and MergeJS to get the Minify grade up.
eureka
<100 Posts
Posts:91


04/10/2008 2:59 PM  
Hi John

I had already removed the comments from the MergeCSS and MergeJS - when they are commented out I get C (71) on driveway and a2z but F (51) in luzzu but with with extra rules - Move dnn xhtml js to Head - Move dnn js links to Head it has dropped to F (49)

I have also removed the comments from the StaticFileHandler in the web.config file in all 3 portals but it has not made any difference.

www.drivewaydesign.eu For A Dream Driveway

www.a2zdom.com Domain name matters


John Mitchell
Posts:3238


04/10/2008 3:39 PM  
Ok, those sites now have a wildcard mapping and are scoring much better.

I also did a little tweaking to your Snapsis.PageBlaster.config files like excluding snapsis and XMod from the DesktopModules exclusion (exclude from exclude means it's included again).

I also added SWF files to your luzzu static files handled by Page Blaster (in web.config). The luzzu site has too much going on to do much better, but if you look at it with YSlow and want to know how to make it better then I can help (it may mean removing stuff like the YouTube videos though).

Let me know if you run into any problems. I'm not sure why Minify is not working on ScriptResource and WebResource, so I'll keep looking into that.
eureka
<100 Posts
Posts:91


04/11/2008 3:57 AM  
Hi John

Thanks for your help luzzu has jumped up from f (49) to D (61) even though it has flash images, youtube video and jquery carousel on the home page - driveway is now an impressive B (83) even with all those images.

I dread to think what it would be without powerful PageBlaster boosting up performance.

www.drivewaydesign.eu For A Dream Driveway

www.a2zdom.com Domain name matters


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 > Put JS at bottom rule



ActiveForums 3.7
Powered by: Snapsis Software