jquery - Absolute urls in html file - running in server and locally -


i have set absolute paths images in website. directory structure below:

root

 client   -- images      ---a.png   -- index.html 

so if use a.png in index.html set src "/client/images/a.png". works fine in server. since files pure html have lost liberty of double clicking , running html files. in case paths broken. understand reason - how browser know root directory? there way work around runs both ways or need run external tool?

it's hard what's going on without seeing html source, should able use relative urls.

so if want access /client/images/a.png /client/index.html page, use url "./images/a.png" image.

the dot @ beginning saying start in our current directory, , subdirectory "images" file "a.png". can use ".." tell @ parent directory if need go 1 or more levels, such if had access in client folder.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -