__/ [ Doug Kanter ] on Tuesday 02 May 2006 20:04 \__
> "Del" <del@xxxxxxxxxxxxxxxxxx> wrote in message
>> "Philip Herlihy" <foof8501@xxxxxxxxxxxxxxxxxxx> wrote in message
>>>> __/ [ Doug Kanter ] on Thursday 27 April 2006 19:37 \__
>>>>> Let's say you've got a web page that includes pictures from a server
>>>>> than the one where most of your content resides. You're not always sure
>>>>> outside source will always be available. Is there a way to code your
>>>>> page to wait a certain period of time for outside content to load, and
>>>>> give up, to avoid giving the user an error message from their browser?
>>> Interesting question. IE4 and Netscape sneaked in a "lowsrc" attribute
>>> to the <IMG> tag, which allowed a lightweight image to be displayed
>>> (often a low-resolution copy of the same original) but it's non-standard
>>> and should be avoided.
>>> One possibility might be to specify (in CSS) a background-image for the
>>> "real" image. If that's small, on a reliable fast server, or already
>>> cached, it should be displayed while the main image is being fetched. I
>>> have to say I haven't tried this dodge, so I can't say if all (or indeed
>>> any) browsers will honour it.
That's an intersting idea, but it requires time/effort. It's better used in
heavily-viewed pages, I guess.
>> Okay, so the browser reads and renders the page and it's contents from
>> top-to-bottom of the html source code just as you would read it yourself.
I imagine that serialisation as such would lead to gains in terms of speed.
Requests for files can be made simultaneously as the source code is
traversed. Rendering is only the subsequent step, which preferably has got
all the files once reached. Any pre-processing that determines order of
requests would cost valuable time.
>> The cunning/dodgy way that you could get... say a 'top of the page' logo
>> to load last would be to sit the image in a <div> at the *bottom of the
>> code*, but give the <div> a style like this;
>> <div style="position:absolute;left:20px;top:20px;">
>> <img src="---.gif">
>> It is the last tag that the browser reads, but still gets placed 20px from
>> the left, 20px from the top of the page.
> I haven't even started building my page yet, but this makes sense. Another
> tidbit for the ever-growing list of ideas. Thank you.
This technique of using <div>'s to permute position for content is widely
used by the search engine optimisation (SEO)-savvy. It is a beauty of
stylesheets, albeit one that's commonly hidden from sight/rationale.
Roy S. Schestowitz | Useless fact: Florida is bigger than England
http://Schestowitz.com | GNU/Linux ¦ PGP-Key: 0x74572E8E
9:10am up 5 days 16:07, 11 users, load average: 0.50, 0.55, 0.63
http://iuron.com - next generation of search paradigms