: Which Filing System Is Better? I realise that this is a bit stupid, but I'm a bit lost here - I've recently decided to re-arrange my webserver's content filing system so that it is more efficient
I realise that this is a bit stupid, but I'm a bit lost here - I've recently decided to re-arrange my webserver's content filing system so that it is more efficient and flexible in regards to the addition of content in the future. Could someone advise on which way will be more beneficial in the long-term?
1.) My current, original filing system:
I currently have a folder for each web page: index, contact, about, etc. Inside each webpage folder I have a folder for each type of content that is on that webpage: css, js, images, flash, pages, etc.
Examples: example.com/contact/images/email.png or example.com/about/flash/copyToClipboard.swf
2.) My proposed, planned filing system:
I plan to have a folder for each type of content. Inside each content folder I plan to have a folder for each webpage.
Examples: example.com/images/index/welcome.png or example.com/js/index/animate.js
General summary: is it better to keep each page's content isolated (filing system #1 ) or to keep all kinds of content together (filing system #2 )?
Thanks :)
More posts by @Reiling115
2 Comments
Sorted by latest first Latest Oldest Best
The first one is better. It allows you to use relative path to your assets (so that there is no problem if you want to rename "contact" to "contact-me").
There is a small benefit with the 2nd method: you can easily batch process files, e.g. optimize all JS file on the web server. However, it won't be much harder to do the same thing in the first approach.
if you have many many files, use a cloud to store it separately
if not many, all files can be saved in root somewhere as /image/ /css/ etc by type
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.