I have created a website (web forms) using ASP.NET
when I test SEO score i got critical alarm because my website uses a lot of javascript files ...
Actually I am using only two files but when I viewed the source page I found this
Is there anyway to tell complier to reduce or merge those files ?
A batch of ScriptResource.axd requests like that are usually due to ASP.NET controls registering includes to the scripts that they're dependent on, especially scripts for the ASP.NET AJAX Control Toolkit controls.
If you want to merge those files without breaking your site, look into the ScriptManager's ability to combine multiple scripts into a single payload
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
2 Points
3 Posts
reduce asp.net automatic javascript files (SEO problem)
Apr 22, 2020 09:56 PM|eng_ahmed_taha|LINK
hi
I have created a website (web forms) using ASP.NET
when I test SEO score i got critical alarm because my website uses a lot of javascript files ...
Actually I am using only two files but when I viewed the source page I found this
I know that this is automatically generated by ASP.NET complier
my question is
Is there anyway to tell complier to reduce or merge those files ?
Contributor
5961 Points
2467 Posts
Re: reduce asp.net automatic javascript files (SEO problem)
Apr 23, 2020 02:42 AM|KathyW|LINK
ScriptResource.axd is for ASP.NET AJAX control toolkit.
Script bundling is handled differently depending what version you are using. See https://github.com/DevExpress/AjaxControlToolkit/wiki/Upgrading-from-v7.x-and-below
Contributor
3370 Points
1409 Posts
Re: reduce asp.net automatic javascript files (SEO problem)
Apr 23, 2020 03:26 AM|samwu|LINK
Hi eng_ahmed_taha,
A batch of ScriptResource.axd requests like that are usually due to ASP.NET controls registering includes to the scripts that they're dependent on, especially scripts for the ASP.NET AJAX Control Toolkit controls.
If you want to merge those files without breaking your site, look into the ScriptManager's ability to combine multiple scripts into a single payload
Combining Client Scripts into a Composite Script
Hope this can help you.
Best regards,
Sam
Member
2 Points
3 Posts
Re: reduce asp.net automatic javascript files (SEO problem)
Apr 23, 2020 06:16 AM|eng_ahmed_taha|LINK
I removed AJAX control toolkit from the first page ... its ok now
THANK YOU;