文件结构的最佳方法?

编程入门 行业动态 更新时间:2024-10-26 22:16:14
本文介绍了文件结构的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

什么是更好/更快? 我们需要一个简短而快速的javascript/ajax网络应用程序文件结构

rs-> c(用于CSS文件) rs-> j(用于js文件) rs-> i(用于图像)

或:

->样式表 ->脚本 ->图片

或:

-> css -> js -> img

如果网址较短,会有所不同吗?

解决方案

如果您担心每个资源的源代码中有两个或三个字节(预压缩).然后,要么您的网站已经高度优化,要么您在寻找错误的地方来提高性能.

我将更加关注您的内容交付如何在子域/CDN之类的东西之间分散,以最大程度地提高负载吞吐量.

确保所有内容都是可缓存的,如果可以的话,请确保将脚本包括在内的内容也进行了整理.

What is better / faster? We need a short and fast file structure for a javascript / ajax web app

rs -> c (for css files) rs -> j (for js files) rs -> i (for images)

or:

-> stylesheets -> scripts -> images

or:

-> css -> js -> img

does it make any difference if the urls are shorter?

解决方案

If you're concerned about two or three bytes in your source code per resource (pre-compression). Then either your website is already highly optimised or you're looking in the wrong place for performance gains.

I'd be more concerned with how your content delivery is spread across things like subdomains/CDNs to maximise load throughput.

Ensure everything is cacheable, also things like ensuring your script includes are bunched up if you can and includes in your CSS.

更多推荐

文件结构的最佳方法?

本文发布于:2023-11-05 18:56:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1561595.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:结构   文件   方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!