简体   繁体   English

为什么我的投资组合网站需要很长时间才能加载?

[英]Why does my portfolio website take a long time to load?

When first visiting my site it stays on the splash screen for about a minute.第一次访问我的网站时,它会在初始屏幕上停留大约一分钟。 I was wondering if it had to do with the file size of my pictures of my HTML and CSS code?我想知道这是否与我的 HTML 和 CSS 代码图片的文件大小有关? You can check the HTML code by viewing the page source.您可以通过查看页面源代码来检查 HTML 代码。 I will add the CSS code if needed.如果需要,我将添加 CSS 代码。

Here is my website: Tom Falzani Portfolio Website.这是我的网站: Tom Falzani Portfolio Website。

Whenever you meets performance issue, don't forget the network tab of your browser's developper debbuging tool.每当您遇到性能问题时,请不要忘记浏览器开发人员调试工具的网络选项卡。 See Google Network Performance Documentation .请参阅Google 网络性能文档

Here is a record of the initialisation and loading of your website, and if we take a deeper look at it, we see that the philly_scene.png file makes 6.3 MB and take 25 seconds to load and that the philly.png file makes 6.6 MB and takes 18 seconds.这是您网站的初始化和加载记录,如果我们深入研究,我们会看到philly_scene.png文件大小为 6.3 MB,加载时间为 25 秒,而philly.png文件大小为 6.6 MB并需要 18 秒。

记录

To avoid this long loading time, you can try to ajust the both size of them using this link, for exemple .为了避免这么长的加载时间,您可以尝试使用此链接调整它们的大小,例如 (Never used) (没用过)
Or you can them asynchronously and deliver a first render of your website until they are actually loaded.或者,您可以异步执行它们并提供您网站的第一次渲染,直到它们实际加载。 If you're using jQuery, take a look at the .load() function , there is also many others ways to do it like the Axios Promise or the Async library if you're using Node.js如果您使用的是 jQuery,请查看.load() 函数,如果您使用的是Node.js ,还有许多其他方法可以做到,例如Axios PromiseAsync 库

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

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