.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Preventing of Javascript files from being loaded for Anonymous Users

Posted By:      Posted Date: October 26, 2010    Points: 0   Category :SharePoint


we have  developed an internet  site using Sharepoint 2010 and are trying to fine fine tune the site w.r.t. the performance and are trying to block the OOTB javascript files(i.e ie55up.js, init.js,SP.Core.js,cui,js etc.) for anonymous users.

Have tried all the conventional ways followed in Sharepoint 2007 for the same (i.e. tweaking SharePoint:ScriptLink , asp:ScriptManager controls, using Sharepoint:SPSecurityTrimmedControl etc.) but in vain.

It appears that the OOTB controls placed even in the Sharepoint:SPSecurityTrimmedControl block are called for anonymous users and call  the .js files).

Can anyone suggest the ways to remove the page weight , currently the javascript alone are taking 2MB even for the anonymous users.


Thanks and Regards,


View Complete Post

More Related Resource Links

Combine, minify and compress JavaScript files to load ASP.NET pages faster

Websites are getting more interactive these days and most of this interactivity comes from JavaScript. People are using different JavaScript libraries and frameworks to make their websites more interactive and user friendly.

Code Name WinFS: Revolutionary File Storage System Lets Users Search and Manage Files Based on Conte


One of the monumental problems organizations face today is aggregating information that's stored in disparate formats. Knowledge workers have long wanted to be able to search for content independent of format. The next version of the Windows operating system, code-named "Longhorn," boasts a new storage subsystem that makes that task easier. That subsystem, code-named "WinFS," allows the user to perform searches based on the metadata of the stored item, regardless of what type of file it is or which application created it. This article covers the basic architecture of WinFS and explains how to use the WinFS managed API.

Richard Grimes

MSDN Magazine January 2004

Javascript at the end of aspx files. What is the benefit?

Hello,In one of the examples I saw a call to a JS function at the end of the aspx file.Like the following:<script language="javascript" type="text/javascript">   <!--    SetExternal();   // --></script>I was under the impression that the JS functions are either called on onlclick of button events or in the HTML Body tag with Onload.So when an aspx page loads then do you thin the following function which is at the end of the page will be called? and why do we put these functions at the end of the page?Thanks.

make anonymous users submit data to a form library

isn't there a way for anonymous users to submit form data to a form library without custom code?

Allow Anonymous Users to respond to blog posts

Hello, I'm using Sharepoint Foundation 2010 and more specifically the blog application. I've turned on Anonymous Access so people can read posts, but I also want them to be able to respond to the posts. Is this possible? Thanks in advance, Bas

Anonymous users submitting Infopath forms via InfoPath Form Web Part

Is there a way for anonymous users in a public facing site to submit InfoPath List Forms via an InfoPath Form Web Part? Currently when I go to a page with the InfoPath Form web part configured as an anonymous users I get the following error message: Error loading the form A form template (.xsn) file cannot be accessed. You may not have the required permissions to open the file The list allows anonymous users permissions to add and view items When logged in the form works fine

Preventing users from changing password

How to i keep users from changing password for a mssql account? We have a shared login which is readonly to the database.  But every now and then, someone decides to change the password.

How to use GZIP for aspx, css, and javascript files.

Hi all,I have heard that if we use gzip, aspx files will be loading faster. But, I am not sure as to how to use it in my web applications.I am hosting my site with GODADDY (ASP 2, IIS 7)Can anyone tell me if I will be able to use gzip? Can you give me a sample file where gzip is used?Thanking you in advanceTomy

Modifying the wssuc:Welcome for anonymous users to have a Register Link

HI every one, First post so be gentle :) Spent a day and a bit on the various sites and not having much luck with my issue, and I am hoping some one can guide me I need to modify the Welcome message to have one more link for anonymous users: Register. So it will say Register | Sign In. I have tried the AnonymousTemplate but it only shows the register when you have logged in, and a few various other ways. I tried to create a custom template for the Welcome control, but didn't have my luck either. Can some one suggest a tutorial or a way forward please. Thanks Lou

Anonymous access for mobile users


I have set up anonymous access on a sharepoint 2010 publishing site, and that works fine. However, when I try to access the site from a mobile device ( or in a browser with a url of http://server/pages/default.aspx?Mobile=1), I get 401 Unauthorized.

In the IIS log, it's showing a 401 on: /_layouts/mobile/mblwp.aspx

Any suggestions for getting anonymous to work for mobile users?



Redirecting Anonymous users IIS 7



I am working on an internal application... i setup IIS 7 to use windows authentication since its behind the firewall and on the domain.. there is a "public" side.. and an "internal" side... if your not part of IT.. you should get the public side.. this is just informational.. my problem is that there is 1 or two pcs that are not on the domain and nobody is logged into them.. how can i just redirect anonymous users to another site???????


everything i read says you can't use anonymous AND windows auth.. so my thought was to just redirect the anonymous users to another site.. how can you do that??  



any help is appreciated!






Hiding the ribbon for anonymous users



Does anyone know the preferred method of hiding the ribbon for anonymous users in the master page?

Thanks in advance - Phil

Too many javascript files loading?


I recently ran yslow on a page i have (master paged etc) and it returned that there were far too many javascript files included (most of which I haven't added).

I guess my question is that given i have v1.0.20229.0 of the toolkit.dll (over .net 2)

I'm wondering if subsequent releases have fixes for this sort of thing?


how can i Register multi javascript files with RegisterClientScriptInclude method in OnPreRender


hi friends.

how can i use multi javascript files with RegisterClientScriptInclude method in custom server controls.

when i call two or more  RegisterClientScriptInclude method, this method registers only one of the javascript files.

protected override void OnPreRender(EventArgs e)
            string testJS = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyControl.js.testJS.js");
            string RichText = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyControl.js.RichText.js");
            this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "MyControl", testJS);
            this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "MyControl",RichText); 

i registered javascript files in AssemblyInfo.cs like this :

[assembly: WebResource("MyControl.js.RichText.js", "text/javascript")]
[assembly: WebResource("MyControl.js.testJS.js", "text/javascript")]

Users can access every new library though Anonymous access id disabled


Hi guys,

I have a really strange stuff going on... I have Anonymous acces disabled on my MOSS portal in Central Administration:

Central Admin->Application Management->Authentication Providers->Default-> Anonymous Access is checked off


So I doesn't even have an option to enable it on any sites of this web application. But when I create a new Document Library all users have read permissions to it though I left only System Account at library permissions .

Am I missing something?

What are the options to get information from anonymous users in sharepoint ?


1) i tried with the infopath form submitting but found out that sharepoint wf wont start for system account submission

2) I tried useing list form, sharepoint workflow doesnt work also it shows view all site contents & throughs an error when anonymous user submit the list form but i can see item in allitem.aspx

i cant use the form based authentication, beacuase form itself an request for account password & we dont want users to register again

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend