Post by KontYentE » Sun Jan 01, 2017 9:43 pm

Hi there,

according to google develops advise, we should use the async and defer for our JS and Styles
https://developers.google.com/speed/pagespeed/insights/

Is there any way possible to do that when calling under the controller files?

The version i'm using is 2.3.0.3

Many thanks

Image


Newbie

Posts

Joined
Sun Sep 04, 2016 3:30 pm
Location - Zurich

Post by KontYentE » Mon Jan 02, 2017 1:56 pm

i thing i've found my self an answer to that:

$this->document->addScript('xxx/jquery.hoverIntent.min.js', 'header', false, true);

where 2nd is location, 3rd is defer and 4th is async... is this still correct for the last version?

Image


Newbie

Posts

Joined
Sun Sep 04, 2016 3:30 pm
Location - Zurich
Who is online

Users browsing this forum: No registered users and 1 guest