简体   繁体   English

Joomla页面加载栏

[英]Joomla page Loading bar

Is there way to show users that the website page started loading. 有没有办法向用户显示网站页面已开始加载。 My homepage is a bit slow and when the page is loading users can only see a blank screen. 我的主页有点慢,加载页面时,用户只能看到空白屏幕。 And gives a impression that the page is not working. 并给人的印象是该页面无法正常工作。 Is there a easy solution for this? 有一个简单的解决方案吗?

Probably the best bet is to see why it's loading slowly. 最好的选择是查看加载缓慢的原因。 If it's server response, there's nothing much you'll be able to do. 如果是服务器响应,那么您将无能为力。 Who is your host? 你的主人是谁? GoDaddy is NASTY slow for large Joomla sites. 对于大型Joomla网站,GoDaddy的NASTY速度很慢。 I've seen extremely well optimized sites that just ran slow as molasses on godaddy - if the server isn't responding quickly, whatever loader you're wanting to show will still take a while for the loader to even get brought up. 我见过经过优化的站点,它们的运行就像在Godaddy上的糖蜜一样慢-如果服务器没有快速响应,那么您想要显示的任何加载程序甚至都需要一段时间才能启动。

If the server responds quickly and the site is just huge or there is a lot of content being downloaded, then some sort of a javascript component would probably be the best answer to put up a temporary 'loading' sort of icon. 如果服务器响应迅速,并且站点很大,或者正在下载大量内容,则某种javascript组件可能是放置临时“正在加载”图标的最佳答案。

My guess is though that the site size is fine and it's the responsiveness of the server that is causing your issues. 我的猜测是,该站点的大小还不错,而正是服务器的响应能力导致了您的问题。 I really like Rochen Hosting for Joomla (they host Joomla's own site!) and they're not that bad pricewise. 我真的很喜欢Rooom Hosting for Joomla(他们托管Joomla自己的网站!),而且价格也不算便宜。 Their shared hosting is about 100x's faster than godaddys and I think you'll notice immediate, amazing performance gains. 他们的共享托管比Godaddys快约100倍,我想您会注意到立竿见影的性能提升。

So ultimately - what is the issue? 所以最终-问题是什么? Which version of Joomla are you on? 您正在使用哪个版本的Joomla? If you're on anything remotely modern, Joomla typically runs fast. 如果您正在使用任何远程的现代工具,则Joomla通常运行速度很快。 I've seen large Joomla sites that will take 2-5 seconds to load on a very fast server. 我见过大型的Joomla网站,要在非常快的服务器上加载,需要2-5秒的时间。 On a over-shared server? 在共享服务器上? That same site would take 15-30 seconds. 同一站点将花费15-30秒。

I would also recommend downloading/installing Firebug (if you use firefox) it can give you amazing detail on how the page is behaving including load times, sizes of everything being downloaded and gives you a better insight into exactly how to optimize for best performance. 我还建议您下载/安装Firebug(如果您使用firefox),它可以为您提供有关页面行为的惊人详细信息,包括加载时间,所下载内容的大小,并让您更好地了解如何进行优化以获得最佳性能。

Good lucK! 祝好运!

Totally agree with Hanny: fix your site rather than spend useful time putting up a 'slow site loading' progress bar! 完全同意Hanny的观点:修正您的网站,而不是花费大量的时间建立“网站加载缓慢”进度条!

Start by turning debug on to analyse what's happening. 首先打开调试以分析发生的情况。 Of course, you want to be doing this on a development install, rather than the live site! 当然,您想在开发安装上而不是在现场进行此操作! My guess is that you have a dodgy extension or two - in my experience, some extensions are really poorly written. 我的猜测是您有一个或两个狡猾的扩展名-根据我的经验,某些扩展名写得很差。 I've seen one extension that makes a database call per article displayed on your page when a simple join would do. 我看到一个扩展,当简单的连接可以执行时,该扩展可以对页面上显示的每个文章进行数据库调用。 I've seen one that makes a database call per link on your page. 我见过有人在您页面上的每个链接上进行数据库调用。 And I've seen an extension that writes to the database twice with every single request. 而且我已经看到了一个扩展,该扩展在每个单个请求中两次写入数据库。 Those kinds of behaviour are a recipe for a slow site. 这些行为是导致网站运行缓慢的原因。 I've seen pages that make ~ 600 database calls. 我看过可进行约600次数据库调用的页面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM