Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

What is best way to remove init.js and core.js for an anonymous publishing site?

  Asked By: Aaditya    Date: Mar 20    Category: Sharepoint    Views: 4144

I am looking to improve the page load time of my publishing site and want to prevent files such as core.js and init.js being downloaded for read only users.

How do people generally go about doing this? I have read this

blogs.msdn.com/.../...ptimizing-response-time.aspx

and this

blog.thekid.me.uk/.../...blic-sharepoint-site.aspx

My master page is completely customized but contains the following standard MOSS WCM javascript on the body and form tags. (I am assuming these are required in authoring mode?). How do people typically remove these wired events in read only mode if we prevent init.js from loading using one of the methods above?


<body onload="javascript:_spBodyOnLoadWrapper();">
<form id="Form1" runat="server" onsubmit="return _spFormOnSubmitWrapper();">

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Asia Meyers     Answered On: Mar 20

Andrew Connell has some good coverage on this issue in his book Sharepoint 2007 WCM Development. In the code downloads for his book he offers a control which suppresses the javascript files  as necessary for authorised and anonymous  users.

The code download is here, and Chapter 19 is what you need to reference;

www.wrox.com/.../...rver-2007.productCd-0470224754,descCd-DOWNLOAD.html


There's an article on the topic by a different author here;

msdn.microsoft.com/.../bb727371.aspx

If you're sold on the usefulness of Andrew Connells book it can be obtained here;

www.amazon.com/.../0470224754

It goes into much more depth than I can here (wouldn't be right to quote it verbatim!)

 




Tagged: