开发者

Can all the /_layouts/xxx.debug.js files not be served to end users? SharePoint 2010

开发者 https://www.devze.com 2023-03-08 11:09 出处:网络
I\'m working with a 3rd party vendor who has done the SP 2010 integration of a small site. I\'ve no开发者_运维百科ticed that our incredibly simple login page is nearly 3.2 megabytes. The users of this

I'm working with a 3rd party vendor who has done the SP 2010 integration of a small site. I've no开发者_运维百科ticed that our incredibly simple login page is nearly 3.2 megabytes. The users of this site are the general public and will include those in rural areas who are still on dial-up. That would obviously be a terrible user experience. It's not so great for those on high-speed connections, IMO (just wasted bandwidth).

Digging into the page, I see that 2.2 megs of the page weight comes from JavaScript files marked debug. I can't see any reason why we should be sending these debug files to end users.

Can these files not be served to users?

Here's a YSlow screenshot, http://i.stack.imgur.com/msGUm.jpg

Also, do we really need to be serving core.css (192k) to end users? Is core.css all the "admin" type of SP css?


Yes, you can serve the minimized version of the javascript files to your end users. There are a couple of ways you can do that. If you are using the ScriptManager tag in the master page there is a property that you can set to control this behavior: http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.scriptmode.aspx

Or as referenced in that page, there is a way to use that setting plus a web.config file setting to control this behavior.

More info on SharePoint's JavaScript files here: http://msdn.microsoft.com/en-us/library/ee539757.aspx

As for core.css, it is impossible to know if your 3rd party vendor has relied on anything in core.css so if you have concerns that's something you should bring up with them.

0

精彩评论

暂无评论...
验证码 换一张
取 消