windows - Best way to share a common CSS and Scripts between web applications? -
using: dreamweaver cs6, coldfusion 10, cfbuilder 3 (soon)
i'm developing 3 seperate web projects using same set of resources each project:
- same css reset , initialisation styles e.g grid layouts
- same jquery initialisation files
at moment each web project has copy of same files in web root. i'd have place sites link these common shared resources. can think of 2 ways this, both similar:
- decide on 'master' site , place css , js files in site only.
- make new site called 'shared or common' , put common stuff in there. new site still has reside on domain. still need choose 'master' project.
both above points difficult because there no 'master' site. none of sites linked in way each other.
say i've decided on master site then link files using qualified url. means when in development environment won't able see these files , use kind of ide introspection see whats in files when make changes (e.g. intellisense detects whats in files , gives hints).
overall whats best way share these resources both development , production environments?
update: after answers realised need virtual directory in iis , virtual folder in windows 7 local folders web project files kept.
you need use web server virtual directories (for iis) or alias (for apache).
simply create alias/virtual directory called 'scripts' (or whatever want) in web root of each site (you can in development environment too, if using iis or apache) , use
<script src="/scripts/my.js" ></script>
Comments
Post a Comment