Announcement

Collapse
No announcement yet.

How to render Js and css

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to render Js and css

    Hello,

    When I test site speed with google, for your site: https://forum.vbulletin.com/
    it gives the same result for mine such as these in pictures. It gives a percent of 51 for your site, and 38-40 for mine.

    How could we resolve these issues?


    Click image for larger version

Name:	1.png
Views:	47
Size:	74.4 KB
ID:	4447102


    Click image for larger version

Name:	2.png
Views:	44
Size:	62.2 KB
ID:	4447104

    Click image for larger version

Name:	3.png
Views:	61
Size:	21.1 KB
ID:	4447101

    Click image for larger version

Name:	4.png
Views:	47
Size:	65.3 KB
ID:	4447103



    For example they advise to put all css and js files in one file , how could this be possible?"

    They ask to defer js scripts, how could this be acheived?

    Is there anyway to do that manually?
    or it is something related to the core of vBulletin and need to be looked at in the next version updates?


  • #2
    Plain and simple, you can't. This code ends up cached on the user's device and speeds up dramatically after first load.

    We're constantly working to refactor Javascript and CSS so it is lighter on the system as fixes and new features warrant it.

    Should note that PageSpeed Insights gives a 98 for desktop and a 70 for mobile when I look at this site. Not a 51 as stated above. Your own internet connection is involved though.
    Last edited by Wayne Luke; Wed 9 Sep '20, 12:17pm.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      Same experience. Thanks wayne for the info!

      Comment


      • #4
        See this issue: https://tracker.vbulletin.com/vbulle...sues/VBV-19055 and its children.
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API

        Comment


        • #5
          Originally posted by Wayne Luke View Post
          Plain and simple, you can't. This code ends up cached on the user's device and speeds up dramatically after first load.

          We're constantly working to refactor Javascript and CSS so it is lighter on the system as fixes and new features warrant it.

          Should note that PageSpeed Insights gives a 98 for desktop and a 70 for mobile when I look at this site. Not a 51 as stated above. Your own internet connection is involved though.
          Thank you Wayne, You are always of great help and support.

          If I use google https://developers.google.com/speed/pagespeed/insights/ , it gives different lower percentages.

          but if use https://gtmetrix.com/ : it gives around 90%

          Page speed dramatically improved after i had scaled some avaters thumbs they mentioned. Also, page size went from megabytes to KB after i removed cintent side bar.

          I am thinking of using CDN, what is your advice, is it ok with vbulletin?, or i would get issues?

          If it is ok, Do you have any recommendations or good written guidance to follow?

          Thank you

          Comment


          • #6
            CDNs are great for static content like images, CSS and Scripts. vBulletin uses a SVG sprite for the majority of its images. SVG tells the client device how to draw the image using XML. So these are smaller than standard images most of the time. We have converted gradients to use CSS so they are lighter on the download. Again this allows the client device to create the background instead of relying on an image. This means the gradients are usually less than 100 bytes compared to 1K or so with images. The only other images are your logo and avatars.

            You can also increase the cache time for guest (unregistered) users. It is set to 0 by default but you can probably set it to 5 minutes. Guests don't necessary need to see the most up to date version of everything.

            You can specify a custom CDN to hold this content in your AdminCP under Settings -> Options -> Server Settings and Optimization Options.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X