/webmasters/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
-
Massive pagespeed penalty for async script (2.5MB) 1 Recommended Answer 2 Replies 1 Upvote
1 Recommended Answer
$0 Recommended Answers
1 Relevant Answer
$0 Relevant Answers
I am trying to increase our website's pagespeed. It feels pretty fast clicking through it, but the Google pagespeed is horrible. 

The main reason for this is we load a chat/helpcenter widget. This widget loads 2.5mb of Javascript. That's pretty much javascript for a chat widget, I know, but it's out of our hands. The javascript loads async. I also tried defer. No matter what I do, as soon as I include this javascript, the pagespeed goes down with 40-50 points. So from for example 90 on desktop we go to 40 because of this single, async loaded script. 

It doesn't block rendering, it's not an important script so it's no problem if it loads later. Why the massive penalty in the pagespeed? 

Are there alternative ways to load the JS that would avoid this score impact? 

Thanks!
Details
Most Relevant Answer Most Relevant Answers (0)
All Replies (2)
-
Most Relevant Answer
Hi! 

I know we do decide what we put on our site, and no worries, fair point :) However, the chat is crucial to our business and swichting to another support solution is the last thing we want at the moment. I also contacted them to see if they have an alternative solution such as loading less JS and only loading JS for the functions we need. There's a lot of functionality in this 2.5MB and we probably only need a tiny little bit of it. 

However, actually I really like the idea to only load the widget when a user clicks the chat button. It has a few downsides such as not being able to display online/offline status and if we disable the chat client in our support system it will still show the button, but I'm definitely going to look into this. Maybe they have an API to check for these kind of things. A simple API call is certainly less load then 2.5MB of JS. Great idea so thanks for that.
marked this as an answer
Most relevant based on info available
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/webmasters/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Marked as Recommended Answer
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
/webmasters/profile/0?hl=en