Typo3 / owlslider PagesPeed Insights - 由于Deffer而无法优化
我有一个Typo3页面,我需要在90以上获得分数。 特别是为此,我已经将JQuery,Owlcarousel和发起脚本设置为推迟。
但是,如果我让滑块远离加载,我会得到97分。 如果我保留它,它将下降到71。
如果我加载所有加载,则“减少服务器的初始响应时间”会出现。 至于我的理解,发生这种情况是因为它加载了HTML并分别加载JavaScript。 但这将使稍后OFC的滑块负载。因为该文档首先加载。
分数也将达到74。
但是,如果我要加载jQuery,owlcarousel和init-script而没有延迟的情况下,
var slider = '.slider-owl-268';
var tnav = true;
var amount = 1;
var dautoplay = false;
amount = parseInt(amount);
var tdots = true;
$(slider).owlCarousel({
items: amount,
lazyLoad:true,
loop: true,
margin: 15,
autoplay: dautoplay,
autoHeight: true,
nav: tnav,
dots: tdots,
fluidSpeed: 1,
responsiveClass: true
});
$( ".owl-prev").html('');
$( ".owl-next").html('');
编辑: 我可能有一个提示,至少可以省略布局转换,可以省略槽槽,以将滑块置于款式上。 它不能解决延期问题,但至少用户看到没有转移,并且给出了一些奖励点。
通过缓存-TTL并消除布局变化,我可以在不使用延迟的情况下获得96的得分。
我希望我能至少达到目标。我应该讨论@mods的问题吗?
I have a TYPO3 Page where i need to get a score above 90.
For this in particular i've already set jQuery, OwlCarousel and the initating script to defer.
However, if i keep the Slider away from loading, i get a 97 Score.
If i keep it, it goes down as far as 71.
"Reduce initial response time of the server" comes around if i load it all defer.
As for my understanding, this happens because it loads the HTML and seperatly the JavaScript.
But that will make the Slider load later ofc. because the document gets first loaded.
But if i will load jQuery, OwlCarousel and the init-script without defer the score also will get to 74.
I dont see a solution here, any tipps?
var slider = '.slider-owl-268';
var tnav = true;
var amount = 1;
var dautoplay = false;
amount = parseInt(amount);
var tdots = true;
$(slider).owlCarousel({
items: amount,
lazyLoad:true,
loop: true,
margin: 15,
autoplay: dautoplay,
autoHeight: true,
nav: tnav,
dots: tdots,
fluidSpeed: 1,
responsiveClass: true
});
$( ".owl-prev").html('');
$( ".owl-next").html('');
Edit:
A Tip i might have, atleast Layout Shifting can be eleminated trough setting the Slider visible in min-height with Styles.
It does not solve the defer Problem but at least the user see's no shifting and it gives a few bonus points.
With Cache-TTL and eliminating Layout Shifting i could get a score of 96 without using defer.
I wish i could but atleast i reached my goal. Should i clouse the question @mods?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论