Length of on-page code and minification not working

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Length of on-page code and minification not working

This topic contains 2 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26128
    EDDYWP47
    EDDYWP47
    Participant

    Hello, the website is currently behind a VPN. WP Core version 5.3 We are also on an Azure IAAS IIS 8.5 server environment. So no FTP access, only RDP for internal user.

    Two questions. First is overall length of the code on-page. Have attached a copy of Source Code from the Home Page. div class=”search-nav-ajax is 177 lines of code long. Is this usual? Is there someway to make this code lighter on-page?

    Second, under Compatibility and other settings.
    We have JS as being minified.
    JS Init method is Dynamic.
    Vertical scroll OFF
    Remember Search Phrases OFF
    Try Fixing SOM duplicates ON
    To try reinitialize OFF
    Load Scripts in footer? ON
    We has CSS as Optimal.
    Minify CSS: ON
    Force Inline OFF
    Load CSS files conditionally OFF .
    Load Google Fonts: ON
    Use custom AJAX: OFF
    Display default search box old browsers? ON

    Am not seeing the code itself, HTML as being minified, as you can see from the attached.

    Any tips or advice? Or is this just the way it is with 177 lines of code hitting the page?

    Best regards,
    Josepf

    #26129
    EDDYWP47
    EDDYWP47
    Participant
    You cannot access this content.
    #26131
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details.

    It looks perfectly fine to me, there are a few extra white spaces (lines, tabs, spaces), but that is probably due to how the menu is rendered. It does not make any difference, browsers ignore the white space.
    The HTML is not minified on purpose (and there is no option for it either), as usually that is being done via 3rd party caching – either by plugins, custom code or CDN (such as cloudflare). The CSS minification is also only minimal to prevent any compatibility issues with CDN or cache plugin asset minification processes.

    Line numbers does not matter that much, the overall page size is important. In your case it is around 94000 characters, which is ~94Kb of HTML code, that is miniscule. Your server probably has gzip enabled as well, which makes it even smaller, I inputted the page source into a gzip calculator, and go this: https://i.imgur.com/znBa7R7.png
    That is ~20Kb of HTML overall. I would not worry about that much. Even Facebook login page has more HTML code than that – and I bet that is optimized beyond everything.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.