About Deleting Unused JavaScripts

Asked 1 years ago, Updated 1 years ago, 26 views

As measured by PageSpeed Insights,

Remove unused JavaScript to reduce data traffic

So, there are about 10 codes like the one below.

URL

/js/vendor.js?version=96be8d4…&env=production(cdn.blog.st-hatena.com)
250.9 KiB
171.8 KiB

Question 1
There is a display like above, but I don't know which part of my site it is.
How do I check it?

Question 2
If I click on the code above, a longer code will appear, but should I compress it and put it back in the site article (html)?

Thank you for your cooperation.
The site is here.
https://www.kaminoonayami.jp/

javascript

2022-09-30 19:33

1 Answers

Assume
PageSpeed Insights
Not all diagnostic results can be addressed.

Site and server administrators can handle this without any problems.
For example, if you use blogging services such as Hatena Blog, and the administrator of a server or site is a service provider, and you are only a single user of the service, you can do only that.

In this case, you may be thinking of compressing or deleting the Javascript, but unless you install it yourself, it will probably be installed by a service provider, so you should contact that service provider.

I will answer after that.

Question 以上 There is an indication like above, but I don't know which part of my site it is. How do I check it?

If you have installed it yourself, there is always a description of your installation on the site, so you have to follow the source code and look for it.

It's hard to delete it unless it's installed by yourself, but it should be something that's generally provided as a service or added as an external link (such as twitter or facebook).

If you don't know which javascript it is, you can check which javascript is loaded by opening the screen in Chorme and pressing F12 (Developer Tool).

The script seems to be some kind of Hatena-kei tool, so why don't you inquire about it?
(Decided by domain cdn.blog.st-hatena.com)
Also, it seems that the compression has already been done in its own way, so I can't handle it after deleting it, but if you delete it, there is a possibility that some functions will not work.Why don't you ask them often?

Question 上 If I click on the code above, a longer code will be displayed. Should I compress it and return it to the website article (html)?

Let's assume that the compression here is mini.
The source code above seems to have already been compressed, but even if you compress the characters further and return them to the in-site article, they will be loaded in double because they are loaded externally, which may cause problems.
If it's not your own Javascript, basically contact your Javascript provider

Of course, if you put your own Javascript, compression will reduce the amount of content loading.


2022-09-30 19:33

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.