Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How use java script?

Featured Replies

I wanted to know how i use java script so that they not affect the loading time of website. My website takes long time to loading. And I think this because of java script.

I wanted to know how i use java script so that they not affect the loading time of website. My website takes long time to loading. And I think this because of java script.

 

This could be the case, could be something else. Give us a link to the site and we'll check it out.

Here's a few general tips to speed up js.

 

1. If you are loading external libraries link to a CDN if possible instead of loading the files from your own server.

 

2. Replace global variables with local vars when they are only used by one function.

 

3. If you are targeting the same DOM elements often, store them in a global/shared variable.

 

4. If you are changing style propperties with js change the classname propperty to an existing css class instead of changing the style propperty itself.

 

5. Remove all whitespace in your js files and compress them.

If your javascripts must be affected after the loading of your website, please put those after yout </body> tag. That will be help you regarding this..

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.