I installed and using the Toolkit in my web site.I am enjoy the cool features , except for one problem : the web page became too big to open,because the script file too large(one file is 255KB).
Yes, I know if a user opened my web page once ,it will be faster ,because the script file will not download again . But I think major visitor will not wait for 1 or 2 min to open my web .
Is any body has the same problem? And is a solution ?
We now use compressed javascript files in the release build and should notably result in smaller downloads. Which file is 255 KB? Could you try the same with the release bits?
Kirti Deshpande
Program Manager, Silverlight and ASP.NET AJAX
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
We build the toolkit in 2 flavors: Ship/Release and Debug. The Toolkit ship scripts are smaller in size. If you use the 10301 version of the toolkit the ship scripts are now compressed(comments and safe whitespace is removed). If you open the linked script
file in notepad you will see that this is the ASP.Net AJAX file and not a Toolkit file. You can post questions about perf issues on the asp.net ajax forums.
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjax.js
// Microsoft AJAX Framework.
Kirti Deshpande
Program Manager, Silverlight and ASP.NET AJAX
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
1- Specify the property "scriptpath" of the ScriptManager object with the path where you have the folder "\System.Web.Extensions" with all the Js files. (Ex: "~/Jscript").
In this case the page will be too big to load in the browser because the files "MicrosoftAjax.js" and "MicrosoftAjaxWebForms.js" will be completely loaded with the page.
If you have the property "scriptmode" = release, then the files will have 80KB plus 20KB. With "scriptmode" = debug the files will have 250KB plus 60KB.
If you have cache for Js in the browser its OK and the first time the page is loaded will take much longer.
2- You leave "scriptpath" empty and the AJAX will generate only the javascript that is needed like this:
VenusBai
Member
3 Points
15 Posts
The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 21, 2007 02:37 PM|LINK
I installed and using the Toolkit in my web site.I am enjoy the cool features , except for one problem : the web page became too big to open,because the script file too large(one file is 255KB).
Yes, I know if a user opened my web page once ,it will be faster ,because the script file will not download again . But I think major visitor will not wait for 1 or 2 min to open my web .
Is any body has the same problem? And is a solution ?
Thanks a lot !
kirtid
Contributor
2610 Points
658 Posts
Microsoft
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 22, 2007 04:52 AM|LINK
Program Manager, Silverlight and ASP.NET AJAX
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
VenusBai
Member
3 Points
15 Posts
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 22, 2007 06:12 AM|LINK
Thank you very much Kirtid. The 255KB file is :
http://www.iam2ya.com/ScriptResource.axd?d=vrvSMawp_0WGqqmTGX1asI3T2R_vAVNchQRILcRhDeu99DMl7dd3CdOiSAo_o9GSoON-VrGYckQdXYdSTjo6zEIuvurZyzx_M44XRjh_GYU1&t=633056550088536400
I am sorry I did not very understand "Could you try the same with the release bits?" because I am a Chinese :)
The version of the Toolkit I am usring is "1.0.10123.0 "
Do you mean I should use a new version of the Ajax Control Toolkit ?
kirtid
Contributor
2610 Points
658 Posts
Microsoft
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 22, 2007 06:37 PM|LINK
We build the toolkit in 2 flavors: Ship/Release and Debug. The Toolkit ship scripts are smaller in size. If you use the 10301 version of the toolkit the ship scripts are now compressed(comments and safe whitespace is removed). If you open the linked script file in notepad you will see that this is the ASP.Net AJAX file and not a Toolkit file. You can post questions about perf issues on the asp.net ajax forums.
//-----------------------------------------------------------------------
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------
// MicrosoftAjax.js
// Microsoft AJAX Framework.
Program Manager, Silverlight and ASP.NET AJAX
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.
VenusBai
Member
3 Points
15 Posts
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 23, 2007 07:35 AM|LINK
Oh, Yes. You are right kirtid.I will ask Bill Gates this question ,ha ~
Anyway thanks a lot !
atsofttech
Participant
830 Points
269 Posts
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 23, 2007 07:58 AM|LINK
I am having same issue and it sees that using AJAX.net slow down the application as well.
Why don't you use other AJAX panel from thrid party?
Dennis van d...
Participant
1129 Points
335 Posts
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 23, 2007 12:10 PM|LINK
Hi all,
You are using the debug library. set in your config file debyg=false or set scriptmode=release in your sciptmanager object.
Hope this helps,
Regards,
http://dennisv.net/
Don't forget to mark the most helpful reply/replies as Answer.
atsofttech
Participant
830 Points
269 Posts
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Mar 24, 2007 08:30 AM|LINK
Thanks
I shall try that
cacosta
Member
6 Points
3 Posts
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Apr 03, 2007 01:44 PM|LINK
Well, let's see.
There are two options:
1- Specify the property "scriptpath" of the ScriptManager object with the path where you have the folder "\System.Web.Extensions" with all the Js files. (Ex: "~/Jscript").
In this case the page will be too big to load in the browser because the files "MicrosoftAjax.js" and "MicrosoftAjaxWebForms.js" will be completely loaded with the page.
If you have the property "scriptmode" = release, then the files will have 80KB plus 20KB. With "scriptmode" = debug the files will have 250KB plus 60KB.
If you have cache for Js in the browser its OK and the first time the page is loaded will take much longer.
2- You leave "scriptpath" empty and the AJAX will generate only the javascript that is needed like this:
ScriptResource.axd?d=3dNkxltjv-1JPul9EiKw4KGad ......
and it will have just 1024 bytes plus 1024 bytes and in this case you will have no cache for this javascript.
Don't forget to include the following line in web.config:
<
add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>In both cases it will generate a script include with this and it will have always 20KB:
WebResource.axd?d=b6R5Ozw2LJY81hvqz ....
Hope it works for you! For me it's rocking !!!....
cacosta
Member
6 Points
3 Posts
Re: The Web Page Is Too Big After Use Ajax Control Toolkit
Apr 03, 2007 02:06 PM|LINK
Just a little correction:
The first time the page is loaded it will always generate JS's with the complete size: 80KB plus 20KB.
In my case, I am working with ScriptManager and UpdatePanel with Async call with just a dropdownlist and a button.