Problem with Path and loading image and docs

Status
Not open for further replies.

akillian

New Member
Messages
7
Reaction score
0
Points
1
Hello,
I just signed up for free account and am having trouble with one image and a pdf loading. The background image is loaded in a media query from /css/responsive.css and the image is in /img/picture.jpg. I keep getting a 404 error and the console says request header is:
GET /img/big_country.jpg HTTP/1.1
Host: akillian.x10host.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://akillian.x10host.com/my_portfolio/css/responsive.css
DNT: 1
Connection: keep-alive
Cache-Control: max-age=0

response header:
HTTP/1.1 404 Not Found
Date: Thu, 14 Jul 2016 23:30:55 GMT
Content-Length: 336
Content-Type: text/html; charset=iso-8859-1
X-Varnish: 122459107 123667746
Age: 644
X-Cache: HIT
X-Cache-Hits: 3
Connection: keep-alive
The CSS to retrieve image is:
/* ===== Change Background Image for smaller devices =================*/

html {
background: url(/img/small_big_country.jpg) no-repeat center center fixed;
......
}


/* For devices 400px and larger: */

@Media only screen and (min-device-width: 400px) {
html {
background: url(/img/big_country.jpg) no-repeat center center fixed;
.....
}
}
Any help much appreciated...
 
Last edited:

akillian

New Member
Messages
7
Reaction score
0
Points
1
I can 'see' the image at URL - [ http://akillian.x10host.com/my_portfolio/img/big_country.jpg ]

try you path as [ /my_portfolio/img/big_country.jpg ]

at this link is more information about your issues --> [ https://validator.w3.org/nu/?showsource=yes&doc=http://akillian.x10host.com/my_portfolio/ ]
Thanks but tried as /my_portfolio/img/big_country.jpg in my responsive.css and still get 404 error. I dont understand because I reference images in index.html for example as <img src="img/re_tt_table.JPG"> they are retrieved but in responsive.css the same img/big_country.jpg is no good??? And you saw you can retrieve image ok. Is there something with this Apache server and how they have relative Paths setup???
 

AngusThermopyle

Active Member
Messages
319
Reaction score
52
Points
28
Your CSS makes the browser request the image from /img/big_country.jpg
It is stored in /my_portfolio/img/big_country.jpg

a. Fix the path to /my_portfolio/img/big_country.jpg
b. Clear your browser cache. And again
c. Try loading the page.

Between a browser's cache and the Varnish cache, you probably saw the results of the old css.
 

akillian

New Member
Messages
7
Reaction score
0
Points
1
Your CSS makes the browser request the image from /img/big_country.jpg
It is stored in /my_portfolio/img/big_country.jpg

a. Fix the path to /my_portfolio/img/big_country.jpg
b. Clear your browser cache. And again
c. Try loading the page.

Between a browser's cache and the Varnish cache, you probably saw the results of the old css.
I updated responsive.css to
html {
background: url(/my_portfolio/img/big_country.jpg) no-repeat center center fixed;
and cleared cache and still get 404 error! I'm beginning to doubt myself.
Here is capture:
path_error.JPG
showfile.html
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Try doing Shift+F5. It is highly likely to do with caching.
I am not getting the issue on my end either.
 

akillian

New Member
Messages
7
Reaction score
0
Points
1
Thanks to everyone who replied. It was a cache issue. Once I converted to absolute path and did several and I mean more then 3x's refresh, image finally kicked in. Its strange. I had this hosted on different site and also my development server and the relative path never gave me a problem.
 
Status
Not open for further replies.
Top