문제

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.

다른 팁

The folder names make no difference. You should focus on actually optimizing your files and how they are delivered.

Once you have optimized your files, consider looking into a content delivery networking like www.cloudflare.com if you are worried about speed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top