Msg#: 4157241 posted 12:08 am on Jun 23, 2010 (gmt 0)
When I type in the url directly, the stylesheet is found and the page shows correctly. But if I click on a link from another page of the website to the same url I typed-in, it isn't finding the stylesheet and the page isn't showing correctly. What could be causing this?
Msg#: 4157241 posted 2:17 am on Jun 23, 2010 (gmt 0)
How about this...the links you are clicking on from other pages are actual links to the live version of the site rather than the development version. Such as this...
Maybe you are working on dev server localhost/subpage.html but click on a link that is actually coded to the live site www.example.com/subpage.html so you are seeing the live version rather than the dev version -- hehehe, not that I have had that happen to me :p
Msg#: 4157241 posted 2:25 pm on Jun 23, 2010 (gmt 0)
Always clear your cache and do a hard refresh (Ctrl + F5) several times to eliminate any possibility of an old cached page being the problem.
If you have used relative paths for your links, you must be sure that you are telling the browser how many directories to backup to and then down to find the file. This is only important if files are in different folders which means you have a more complex directory structure. Absolute paths to folders/files is ok, but relative paths work just fine.
Too bad they don't allow URLs to sites so we can look at the problem page(s).
respectively. Two different links for the same file. But if you use
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:
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.