user-experience

What is a better way to sort by a 5 star rating?

被刻印的时光 ゝ 提交于 2019-11-26 08:57:41
问题 I\'m trying to sort a bunch of products by customer ratings using a 5 star system. The site I\'m setting this up for does not have a lot of ratings and continue to add new products so it will usually have a few products with a low number of ratings. I tried using average star rating but that algorithm fails when there is a small number of ratings. Example a product that has 3x 5 star ratings would show up better than a product that has 100x 5 star ratings and 2x 2 star ratings. Shouldn\'t the

JavaScript in <head> or just before </body>?

夙愿已清 提交于 2019-11-26 08:08:24
问题 I am about to embark on a new web project and I plan to put some JavaScripts in the <head> and also some before </body> , using the following scheme: Scripts that are essential for the UX of the page: in the <head> . As I\'ve picked up perusing the web - scripts in the <head> is loaded before the page loads, so it would make sense to put scripts that are essential to the user experience there. Scripts that are non-essential to the design and UX (Google Analytics scripts etc.): before the <

ASP.NET MVC Custom Error Handling Application_Error Global.asax?

荒凉一梦 提交于 2019-11-26 00:35:22
问题 I have some basic code to determine errors in my MVC application. Currently in my project I have a controller called Error with action methods HTTPError404() , HTTPError500() , and General() . They all accept a string parameter error . Using or modifying the code below. What is the best/proper way to pass the data to the Error controller for processing? I would like to have a solution as robust as possible. protected void Application_Error(object sender, EventArgs e) { Exception exception =