Some images don't load on previewed web pages
Status: Alpha
Brought to you by:
petewarden
I've noticed that some pages (eg http://lizbaumann.com\) have images
that don't show up when shown in the preview window.
I suspect that this is related to problems setting the base attribute of the
html. Since the page is actually being displayed in a local frame, the script
has to add a base attribute telling it how to correctly resolve anything
with a relative path. I suspect there's a problem with that.
Logged In: YES
user_id=160615
Philipp Lenssen has been trying out SearchMash, and has also noticed some CSS
imports aren't being loaded. I suspect this is the same problem with the base
URL causing problems with relative paths.
Logged In: YES
user_id=160615
I changed the base URL to be the full location of the original page, rather than
just the path (up until the last /) part of the URL, since the full one is actually
what's expected, and I was thinking too much of a filesystem when I tried to
set the 'directory'.
This seemed to fix almost all the problems, I help off closing this until I'd
checked out pages which still seemed to be having problems. The only one I
could locate is http://www.la-va.org/profile.php?artist_id=25 , and it turns
out this doesn't close its head tag, and since the base tag is inserted before
</head>, it never ends up being added.
I thought about making the base insertion cope with this case, but I don't
want to do that until I see more URLs that cause this problem if it's rare I
don't want te risk of making the code more complex, since that might
introduce other problems. Closing for now, I'll reopen if I see more problm
pages.
Logged In: YES
user_id=160615
I've reopened this, since I'm seeing a lot of pages with problems when I try with
the search terms 'mother theresa'.
Logged In: YES
user_id=160615
I dug into the examples with the terms mother theresa, and discovered a
couple of problems.
First, the base URL was inserted before the </head> end tag. The search for
this tag was case sensitive, so upper case tags were missed.
Once this was fixed, there were still some issues. Looking into them I realized
that there were relative resource URLs for things like CSS sheets inside the
head block, and they weren't resolved because the base tag hadn't been seen
yet. To get these working, I had to add the base tag just after the opening
<head> tag rather than at the end.
That made a lot more sites appear correctly, but also uncovered some bugs
with the script-blocking code, since many scripts were accidentally blocked
because they were referenced with relative paths in the head. I put fixes in to
make the script blocking more robust.
Overall, I see most sites showing up correctly after putting in these fixes. I'll
close this bug again, and probably open up new bugs on any remaining
cases, since the bulk of the issue seems to have been addressed
Logged In: YES
user_id=160615
Resurrecting this one, I'm still sometimes seeing missed files in the logs, and I discovered that a search for the terms 'avant' and 'browser' produces a front page that has missing images.