tag:blogger.com,1999:blog-4126985520350746834.post8174511205880975766..comments2024-03-28T07:00:21.554+00:00Comments on Chris O'Brien: Eliminating large JS files to optimize SharePoint 2010 internet sitesChris O'Brienhttp://www.blogger.com/profile/10022906552670607366noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-4126985520350746834.post-65911001448215011422013-06-26T19:26:49.039+01:002013-06-26T19:26:49.039+01:00Excellent Post!!Excellent Post!!Edson Catugyhttps://www.blogger.com/profile/06257600021912949900noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-22477927688418543562012-11-07T23:21:59.928+00:002012-11-07T23:21:59.928+00:00@Anonymous,
Afraid I'm not sure why this woul...@Anonymous,<br /><br />Afraid I'm not sure why this would happen. We used the code in this article on an anonymous public-facing website, so I'm not sure what you could be doing differently..<br /><br />Chris.<br /><br />Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-35269316238053707462012-11-07T04:22:53.343+00:002012-11-07T04:22:53.343+00:00i have used your code, placed the compiled dll in ...i have used your code, placed the compiled dll in bin folder of my web application (both default and extended) and updated web.config accordingly.<br /><br />when i try to access the site anonymously i get error, i try to check logs but not able to find any particular reason.<br /><br />am i missing something?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-44912279785128957632012-10-29T15:44:08.357+00:002012-10-29T15:44:08.357+00:00Great article!
You mention that it could be impro...Great article!<br /><br />You mention that it could be improve to remove useless CSS.<br /><br />I tried some reflection but didn't found when the css are loaded.<br /><br />Do-you have any clue to remove the following css?<br />controls.css<br />page-layouts-21.css<br />rca.css<br />corev4.css<br /><br />Thanks,<br /><br />FrançoisFrançoishttps://www.blogger.com/profile/04311748729752691621noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-20627142917171612102012-10-03T22:28:32.575+01:002012-10-03T22:28:32.575+01:00@Anonymous,
I don't think you'll be able ...@Anonymous,<br /><br />I don't think you'll be able to remove the files you mention - SharePoint loads them in a different way, and you'll most likely get errors even in presentation mode.<br /><br />It's a shame, but I think that's the way it is.<br /><br />HTH,<br /><br />Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-43852927972192960102012-10-03T17:12:57.173+01:002012-10-03T17:12:57.173+01:00Hi Chris.
I've followed your example and it a...Hi Chris.<br /><br />I've followed your example and it appears to be working. However, how can I remove some of the other .js files on the page? For example, sp.runtime.js, sp.js, and cui.js. These files are not in our HttpContext.Current.Items collection.<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-49937685460352494262011-07-19T15:59:48.295+01:002011-07-19T15:59:48.295+01:00@Christophe,
I'm not sure this technique is b...@Christophe,<br /><br />I'm not sure this technique is best used with the standard master pages - those things have way too many controls in which will depend on functions which could be in core.js.<br /><br />The main purpose of the approach (in my head) is for minimal master pages, most likely used for anonymous sites. Otherwise I think you could be chasing down and removing individual controls for some time.<br /><br />Does that make sense?<br /><br />C.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-35216615288317632462011-07-19T03:57:00.005+01:002011-07-19T03:57:00.005+01:00hi Chris,
I'd like to follow your advice, but...hi Chris,<br /><br />I'd like to follow your advice, but - as expected - I get error messages when removing core.js. Any advice on a clean process to remove js files when starting from a standard master page (masterV4)?<br />For the record, the current forum thread:<br />http://sharepoint.stackexchange.com/questions/15669/errors-after-removing-core-js<br /><br />Thanks!Christophehttp://blog.pathtosharepoint.comnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-27163383931503327012011-07-01T16:27:34.291+01:002011-07-01T16:27:34.291+01:00@Sal,
Yes you will need a TagPrefix, just as you ...@Sal,<br /><br />Yes you will need a TagPrefix, just as you would when adding any control to an .aspx page.<br /><br />Cheers,<br /><br />Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-75499863691861307252011-07-01T06:34:41.666+01:002011-07-01T06:34:41.666+01:00Hi Chris,
Thank you for the post. I'm trying t...Hi Chris,<br />Thank you for the post. I'm trying to implement it on my master page. I have built a class and now try it to referne it on my master page. Do I need to register a tag prefix?<br /><br />Thank you<br />SalSal Carlhttps://www.blogger.com/profile/03056386081625971129noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-9775516499819922082011-03-11T12:05:41.900+00:002011-03-11T12:05:41.900+00:00@Anjul,
Interesting finding - that's not the ...@Anjul,<br /><br />Interesting finding - that's not the behaviour we have with our site. As you can see in the 2nd screenshot init.js is present but the other large JS files are not. My guess is you're finding a difference due to the way you are using ScriptLink controls in your site.<br /><br />In terms of the dependencies between the Microsoft JS files - I don't have an established list, an in case you could have some variance depending on which JS code runs on your pages. Test, test, test is the only way I'm afraid.<br /><br />Thanks,<br /><br />Chris.Chris O'Brienhttps://www.blogger.com/profile/10022906552670607366noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-16614224581113346692011-03-10T06:34:07.832+00:002011-03-10T06:34:07.832+00:00Excellent Post!!
If we add back init.js it adds al...Excellent Post!!<br />If we add back init.js it adds all the JS files that we might have exluded as it has a refrence to all the other JS files.<br /><br />After removing the JS file Forms submit stopped working and also had JS error on page where we have used OTB content editor webpart to display the static contnet. To resolve this we have created another master page where we have not excluded any of the JS files and it works. But we have to test test and test.<br /><br /><b>Can you suggest what are the dependencies on these JS files.</b>Unknownhttps://www.blogger.com/profile/15229283001056521908noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-37667723061667014772011-03-09T17:16:18.292+00:002011-03-09T17:16:18.292+00:00Excellent job, great post.Excellent job, great post.kgnoreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-78992565513072387992011-03-02T12:00:19.392+00:002011-03-02T12:00:19.392+00:00Nice Post. Chris. Adds value to development activi...Nice Post. Chris. Adds value to development activities.Benedict Alphonsehttps://www.blogger.com/profile/06273740826562598488noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-69932133559982128132011-02-20T17:05:50.566+00:002011-02-20T17:05:50.566+00:00Nice write up Chris! Thanks for the detail on spe...Nice write up Chris! Thanks for the detail on speed savings and how the solution works. Very interesting.Jeffhttps://www.blogger.com/profile/09079729215533560354noreply@blogger.comtag:blogger.com,1999:blog-4126985520350746834.post-56338682563339572622011-01-24T16:07:23.832+00:002011-01-24T16:07:23.832+00:00good job!!!good job!!!Mario Cortés Floreshttps://www.blogger.com/profile/16630613586153177866noreply@blogger.com