Website message overhaul
Jacob Carlborg
doob at me.com
Mon Nov 14 23:36:41 PST 2011
On 2011-11-14 22:05, Vladimir Panteleev wrote:
> On Mon, 14 Nov 2011 22:43:05 +0200, Jacob Carlborg <doob at me.com> wrote:
>
>> On 2011-11-14 21:09, Vladimir Panteleev wrote:
>>> Speaking of which, the twitter widget needs to be placed in an iframe so
>>> that it doesn't block the page load (inline scripts cause browsers to
>>> stop parsing the page until the script is loaded and executed, which
>>> creates a network dependency on a website we don't control).
>>>
>>
>> Put the JavaScript at the end of the page instead.
>
> The script writes its content during execution. Unless the Twitter JS
> supports writing to a specified element, it can't be at the end without
> CSS positioning hacks.
>
BTW, if that Twitter feed isn't updated live, i.e. no page reload is
required, there's no reason to use JavaScript to load the feed.
On the other hand d-p-l.org only consists of static pages and then the
above will not work.
New idea, if JSONP is still supported by the Twitter API that could be
used to make an AJAX request for the Twitter feed and insert it in the
DOM after the page has finished loaded.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list