Mobile app version of vmapp.org
Login or Join
Reiling115

: 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

@Reiling115

Posted in: #Content #Webserver

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 :)

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Reiling115

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

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.

10% popularity Vote Up Vote Down


 

@Sherry384

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme