/    Sign up×
Community /Pin to ProfileBookmark

javascript remove all space before public website

I saw many website remove their javascript’s space to make it difficult to understand.
so I want to know it will make website load faster?
or other reason?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@sibertJul 15.2021 — Many claims that minify CSS and Javascript reduce the loading time. https://javascript-minifier.com
Copy linkTweet thisAlerts:
@BusinessANDwebJul 15.2021 — I don't think that spaces will affect the load time of your website. But I believe that a lot of code can affect load times. Try jquery, you can more with less code wich can help for load times
Copy linkTweet thisAlerts:
@sibertJul 15.2021 — > @BusinessANDweb#1634202 Try jquery

There are different [**opinions**](https://stackoverflow.com/questions/18418529/jquery-speed-vs-javascript-speed) about jQuery.
Copy linkTweet thisAlerts:
@NogDogJul 15.2021 — In general, text files such as javascript files are transferred quickly (unless your internet is very slow), as the actual number of bytes is small compared to things like large image files, or even more so video files. While "minifying" files should make them even faster, probably more important in many cases is reducing the _number_ of files, since each file needs a separate HTTP request to fetch it (and the browser typically has a limit as to how many it will request concurrently). Therefore, if you have numerous JS and CSS files, you might be better served speed-wise by merging them into a single JS file and a single CSS file where practical, before worrying about shrinking them further.

Rule #1 though: measure first, then fix. Use any of the many tools out there to measure/analyze web page performance to see where the real problems are, then fix them -- rather than just trying random things to see if they help.
×

Success!

Help @Nitiphone spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...