Re: Output loadJS content before closing body tag (feature request)
Justin Carter <[email protected]> Mon, 10 Feb 2014 14:37:26 -0800 (PST)
| Newsgroups | gmane.comp.cms.farcry.devel |
|---|---|
| Message-ID | <[email protected]> |
Also, be very careful relying on core:cssInHead/jsInHead because they could
die in a fire at any time! The readme.txt in that folder says:
"Do not use these tags outside of /farcry/core! You have been warned."
Hahaha :)
On Tuesday, February 11, 2014 9:29:13 AM UTC+11, Blair McK wrote:
>
> For the moment you can call core:inHead directly with variable attribute
> - the tag will return an array of { id, html } structs in that variable.
> The IDs are all one of "onReady", "stylesheet-#libraryid#" and
> "javascript-#libraryid#". Note that the onReady html doesn't include the
> $j(function(){ ... }); wrapper.
>
> I originally added r_html so we could capture js/css requirements for an
> ajax response and pass them back in JSON, but it should work equally well
> for your case. Having the ids will allow you manually pick which libraries
> go in the head and which ones inline.
>
> Blair
>
>
> On Tue, Feb 11, 2014 at 8:21 AM, Justin Carter <[email protected]<javascript:>
> > wrote:
>
>> Yeah, I'd be tempted to recommend everyone use Grunt (or similar),
>> Require.js, and do their own CSS and JS minification (a few less things for
>> FarCry Core to do!), but not everyone would be comfortable with that :)
>>
>> In general though, I think 7.1 needs to focus on performance a bit more,
>> so I'm sure there's something we can do.
>> On 11/02/2014 7:59 AM, "Sean Coyne" <[email protected] <javascript:>>
>> wrote:
>>
>>> If you have lots of js files, it might be better to start using a
>>> modular system to load them as they are required and forego FarCry's
>>> handling. Something like require.js
>>>
>>> On Monday, February 10, 2014 3:42:03 PM UTC-5, Justin Carter wrote:
>>>>
>>>> I've been wanting to do this for core except there is a bunch of code
>>>> that is injected using skin:onReady and skin:htmlHead that relies on having
>>>> jQuery already loaded in the head, so we also need a way to shift that code
>>>> to the footer (but below the tags which load scripts). I don't think I'll
>>>> have time to do this for 7.0, so probably 7.1.
>>>>
>>>> At the moment we have some sites where we place the JS in the footer
>>>> manually, without using loadJS, and it's not too inconvenient if your front
>>>> end just uses a couple of JS files, but may be a hassle if you use more
>>>> than that.
>>>>
>>>> cheers,
>>>> Justin
>>>> On 11/02/2014 7:26 AM, "Jeff Coughlin" <[email protected]> wrote:
>>>>
>>>>> Now that everything has been going html5 and people are pushing for
>>>>> faster load times (especially with mobile website support), one feature
>>>>> FarCry could really use is the ability to output loadJS content before the
>>>>> closing body tag. This can be done simply by saving the data to a request
>>>>> variable and giving us the option to either output it in the head block
>>>>> (current way it works) or use the request variable content wherever we want.
>>>>>
>>>>> Can I get any +1 votes on this? :)
>>>>>
>>>>> https://farcry.jira.com/browse/FC-2852
>>>>>
>>>>> --
>>>>> Jeff Coughlin
>>>>>
>>>>> --
>>>>> You received this message cos you are subscribed to "farcry-dev"
>>>>> Google group.
>>>>> To post, email: farcr...-/[email protected]
>>>>> To unsubscribe, email: farcry-dev+...-/[email protected]
>>>>> For more options: http://groups.google.com/group/farcry-dev
>>>>> --------------------------------
>>>>> Follow us on Twitter: http://twitter.com/farcry
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "farcry-dev" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to farcry-dev+...-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>> --
>>> You received this message cos you are subscribed to "farcry-dev" Google
>>> group.
>>> To post, email: farcr...-/[email protected] <javascript:>
>>> To unsubscribe, email: farcry-dev+...-/[email protected] <javascript:>
>>> For more options: http://groups.google.com/group/farcry-dev
>>> --------------------------------
>>> Follow us on Twitter: http://twitter.com/farcry
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "farcry-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to farcry-dev+...-/[email protected] <javascript:>.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>> --
>> You received this message cos you are subscribed to "farcry-dev" Google
>> group.
>> To post, email: farcr...-/[email protected] <javascript:>
>> To unsubscribe, email: farcry-dev+...-/[email protected] <javascript:>
>> For more options: http://groups.google.com/group/farcry-dev
>> --------------------------------
>> Follow us on Twitter: http://twitter.com/farcry
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "farcry-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to farcry-dev+...-/[email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcry-dev-/[email protected]
To unsubscribe, email: farcry-dev+unsubscribe-/[email protected]
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry
---
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to farcry-dev+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/groups/opt_out.