Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!



On EPiServer pages, the tag <script src="/Util/javascript/episerverscriptmanager.js" type="text/javascript"></script> seems to be added to the output code, even for public pages when user is not logged in.

Is there an easy way of getting rid of it?

Sep 03, 2008 9:26

I'm also interested in getting rid of this script..


Oct 28, 2008 9:13


If you read this post I hope it will explain some of the things going on with episerverscriptmanager.js. At least if you have below code almost at the end of page. If you don't I am really interested to hear about it. I make some suggestions to solve the problems in the post above, but forgot to mention turning On page edit off, which should solve the problem as well.

EPi.RegisterPropertyObject(window, "EPiObject", {EPiOnPageEditControl:"OnPageEditControl"}); 


Oct 28, 2008 9:33

thanks for your good explanations!

I have created a new aspx from Visual Studio (containing the standard crap, basically it's empty), and the code behind extends TemplatePage. I have not added any episerver controls to the page (and I have not included the snippet you mentioned above). 

The script still shows up (this means that it is loaded from the Episerver dlls). This is normally not an issue, but we are creating a mobile portal - and we want to keep the load as low as possible.

Oct 28, 2008 11:07

Have you tried to inherit from SimplePage? I have no idea if it helps the problem (not tested) but I think it would prevent the problems with EPiServerScriptManager.js and it should be better performance wise.

The TemplatePage constructors also allows you to disable ContextMenu. This is done by calling the TemplatePage constructor from your page constructor.

PageConstructor() : base(0, EPiServer.Web.PageExtensions.ContextMenu.OptionFlag)



Oct 28, 2008 14:00

Thanks for your help, Henrik!

 I need the context menu to  be available if the user is logged in. Adding the following did it:

protected override void OnPreInit(EventArgs e)
if (!HttpContext.Current.User.Identity.IsAuthenticated)
ContextMenu.IsMenuEnabled = false;
I still think it's strange that I need to add this code to avoid loading the script.. 


Edited, Oct 29, 2008 8:05

I see...
In that case you'll also have to prevent the script registering of "EPi.SetupPropertyObjects" in bottom of the page, otherwise you will get a script error.
But that is perhaps the only solution until we have a fix for the problem. And no, I don't know when a fix will be available ;)...

Oct 29, 2008 8:20
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.