Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

WEB : How to REDUCE UNUSED Javascript

Subscribe

Get notified when there's activity on this post

This question has been flagged
javascriptwebsite_builderwebpageminifySEO
1 Reply
4480 Views
Avatar
Jozef Slivka

After webpage tests, I see clearly the largest issue (more than first 7seconds loading time) why the mobile version is performing poorly is super large UNUSED Javascripts, and it says "Reduce unused Javascript" for the following....BUT how? 
web.assets_frontend_lazy.min.js - 924KB
en_US/base.js - 602KB
recaptcha__en.js - 162KB
www-embed-player.js - 109KB
Why odoo is serving complex Javascript files, if I am not using most of it? How to minify it, or totally not used it, OR set it to be loaded as last thing, AFTER page is rendered?
At the moment JAVASRIPTS are loading as very first files, so it creates much larger Page render time fo user as it should be.

0
Avatar
Discard
Barry

I'm having the same issue and trying to figure out how to remove unused js. Lighthouse and WebVitals have identified the same ...lazy.min.js file as a culprit and I can't seem to access nor edit this file. This is a huge throw off for me.

No solutions on your end as yet?

Avatar
Juan Valencia
Best Answer

Though I don't know how to reduce the size, and I'm looking for the same answer, may you post the website link you are testing, and I assume you are using PageSpeed insights?


Odoo pretty much packages the entire framework in a single JS file that is already minified, and it's loaded after the page is rendered. (it uses the defer atribute). So far there is nothing we can do to reduce that file but we can look the PageSpeed reports and find if the bottleneck is somewhere else.

0
Avatar
Discard
Jozef Slivka
Author

Hi, well different tools shows different issues : https://tools.pingdom.com/ shows the F-grade "Add Expires headers" and as E grade " Compress components with gzip"...pretty important..
Pagespeed shows best savings in:
5.6s in Reduce unused JavaScript (especially important issue for Mobile users)
2s in Reduce initial server response time
seems there is alot other details which could be done in more complex way, to speed up the user experience.....from my point of view the biggest issues are mainly the biggest delays...any ideas?

Juan Valencia

That's very strange. Odoo uses nginx server and it serves files with gzip compression by default.

As for "expire headers", they are set in all resources except in the HTML page itself. Odoo doesn't cache the html page, so everytime it is called, the qweb is rendered and it serves the html page. But the resources like css, js, images, fonts, etc, they do have expire headers.

I was curious about tools.pingdom tool, tried it against to my site and it doesn't show any result in the https version. Only on the http version and shows a 301 redirect because I forwad all http traffic to https. That tool doesn't seem to support https at all. To be honest, it looks like a terrible tool. Use another one.

As for ideas... have you already configured a CDN? That alone will improve the response speed and reduce delays. There are free ones available. Even Odoo has documentation about a particular CDN.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
How to Add rel="nofollow" to External Links in Odoo?
website_builder Website SEO
Avatar
0
Apr 25
2111
Need Assistance Connecting Button to JavaScript Code in Odoo 17
javascript editor website_builder
Avatar
0
Mar 24
2401
Javascript loaded into website.assets_frontend only working on homepage not internal "pages" <<Solved>> Solved
javascript website_builder themes
Avatar
1
Dec 23
14591
Website Builder jQuery
javascript jquery website_builder
Avatar
0
Feb 22
3633
Target Specific XML Element with JavaScript
javascript customization website_builder
Avatar
0
Feb 22
3171
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now