PageSpeed InSights Broken Preview

106 views
Skip to first unread message

Cerem Beyazıt

unread,
Feb 20, 2018, 9:29:04 AM2/20/18
to pagespeed-insights-discuss
Hi everyone.

My web site's PageSpeed InSights score is 100% but site looks like broken in the preview area. Screenshot is attached.

I'm using this code for CSS preload;
<link rel="preload" href="<?php echo base_url('assets/frontend/css/bootstrap.min.css'); ?>" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="
<?php echo base_url('assets/frontend/css/bootstrap.min.css'); ?>">
</noscript>
<link rel="preload" href="
<?php echo base_url('assets/frontend/css/main.css'); ?>" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript>
<link rel="stylesheet" href="
<?php echo base_url('assets/frontend/css/main.css'); ?>">
</noscript>

Thanks.
Cerem
screenshot_96.png

Rick Steinwand

unread,
Feb 20, 2018, 10:24:03 AM2/20/18
to pagespeed-insights-discuss
You should be using rel="preload" ONLY for non-critical css.

The proper way to do this is to inline critical css (css needed to render the page) in your head, then load the non-critical with rel="preload".

The problem is bootstrap,css and main.css apparently are needed to rendering your page.

Next time test with a test page until you get it right.

Message has been deleted

Cerem Beyazıt

unread,
Feb 20, 2018, 10:50:42 AM2/20/18
to pagespeed-insights-discuss
I did this. Now Screenshot is visible but mobile score is 81 and desktop score ise 93.

20 Şubat 2018 Salı 18:24:03 UTC+3 tarihinde Rick Steinwand yazdı:

Rick Steinwand

unread,
Feb 20, 2018, 10:56:36 AM2/20/18
to pagespeed-insights-discuss
It's difficult to help without a link to the page.

To be honest, it's difficult to get a score of 100% so I didn't think for a moment it was legitimate.

Cerem Beyazıt

unread,
Feb 20, 2018, 11:04:27 AM2/20/18
to pagespeed-ins...@googlegroups.com
Oh sorry.


20 Şub 2018 18:56 tarihinde "Rick Steinwand" <rickst...@gmail.com> yazdı:
It's difficult to help without a link to the page.

To be honest, it's difficult to get a score of 100% so I didn't think for a moment it was legitimate.

--
You received this message because you are subscribed to a topic in the Google Groups "pagespeed-insights-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pagespeed-insights-discuss/PQO2cCK_XSw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pagespeed-insights-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pagespeed-insights-discuss/bec8105b-6f65-4a90-b168-ae2d2a127cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rick Steinwand

unread,
Feb 20, 2018, 11:49:20 AM2/20/18
to pagespeed-insights-discuss
Your site is blocked for me at work so I can't view source.

I assume you removed the rel="preloads" and also the noscript code.

Cerem Beyazıt

unread,
Feb 21, 2018, 12:36:38 AM2/21/18
to pagespeed-insights-discuss
Hi Rick. Yes, i removed that codes from main scripts.

20 Şubat 2018 Salı 17:29:04 UTC+3 tarihinde Cerem Beyazıt yazdı:
Reply all
Reply to author
Forward
0 new messages