Page is a not externally linkable
rocknbil - 7:17 pm on Jun 23, 2010 (gmt 0)
Relative paths *work* but they always seem to bring up problems like this. If you have
/css/style.css
/modules/classes/autonomy.html
/modules/classes.html
You have to have
../../css/style.css
and
../css/style.css
respectively. Two different links for the same file. But if you use
/css/style.css
in both files, you have both consistency and ease of maintenance, no need to remember how many toothpicks get you back to home. :-) So that's the first thing, adopt this usage when uploading and many of these will go away. Down-side: it doesn't work offline, your computer is not (usually) a web server and has no document root.
O.T.: As for versioning issues ("I updated the style sheet, changes aren't showing") this is often a combination of browser specific issues and the caching settings of the server, both eliminated (well, worked around) by an old trick. Leave your stylesheet file name the same, but use a query string:
href="style.css?version1234"
Change the bolded portion every time you upload, this will trick the browser into thinking it's a new file and will always download the style sheet. Of course this is not something you'd want to do site-wide, just while making mods to specific pages, but it speeds up your development.