Gegeensoft
","marks":[{"type":"code"}],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"8. Web Workers","marks":[{"type":"code"},{"type":"bold"}],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"Javascript-ийн Web Worker технологийг ашиглан ачаалал ихтэй тооцоолол шаардсан үйлдэл, script үүдийг core thread ийг ачааллыг чөлөөлж background thread рүү шилжүүлэх боломжтой.","marks":[],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"const worker = new Worker(new URL('./worker.js', import.meta.url));","marks":[{"type":"code"}],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"worker.onmessage = (event) => {\n console.log('Received message from worker:', event.data);\n};","marks":[{"type":"code"}],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"worker.postMessage('Hello, worker!');","marks":[{"type":"code"}],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"9. Server-Side Rendering оновчтой болгох","marks":[{"type":"bold"}],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"Static Generation (SSG): Мэдээлэл нь байнга өөрлчөгдөх шаардлагагүй хуудсуудыг getStaticProps ашиглан хуудсуудыг статик хуудас болгож ачааллыг илт багасгах боломжтой.","marks":[],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"export async function getStaticProps() {\n const data = await fetchData();\n return {\n props: { data },\n };\n}","marks":[{"type":"code"}],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"Server-Side Rendering (SSR): Хүсэлт бүр дээр Интерактив үйлдэлтэй, хариу үйлдэл үзүүлэх шаардлагатай хуудсанд getServerSideProps-ийг ашиглан сервер талын render ашиглан ачааллыг багасгах боломжтой юм.","marks":[],"data":{}}]},{"nodeType":"paragraph","data":{},"content":[{"nodeType":"text","value":"Эдгээр стратегийг хэрэгжүүлснээр та Next.js аппликейшн даа JavaScript-н гүйцэтгэлийн хугацааг багасгаж, гүйцэтгэлийг сайжруулж, хэрэглэгчийн туршлага, хэрэглээг сайжруулах боломжтой. Үүнээс гадна та өөрийн төслийг амжилттай болгохын тулд Lighthouse, Web Vitals зэрэг хэрэгслүүдийг ашиглан өөрчлөлтийн үр нөлөөг үргэлж дүн шинжилгээ хийж хэмжиж хэвших нь маш үр дүнтэй арга байх болно. ","marks":[],"data":{}}]}]}}
Hero BG
inside our 
agency

We’reacompanybuiltonalegacyofcraftsmanship,creativityandfire.

Background
Author

Ijiltsetseg Tumenjargal

Bio

Driven by over 12 years of web engineering excellence,Ijiltsetseg Tumenjargal is the powerhouse entrepreneur and visionary founder of Gegeensoft. Founded in Ulaanbaatar, Mongolia, and now expanded to Chicago, USA, Gegeensoft has grown into a leading high-performance website architecture and digital solutions agency, engineering premium, production-grade systems for global markets.

Next JS дээр "Reduce JavaScript execution time" алдаанаас хэрхэн сэргийлэх вэ?

Next JS дээр "Reduce JavaScript execution time" алдаанаас хэрхэн сэргийлэх вэ?

Next.js програмын JavaScript-ийн ачааллах хугацааг багасгах нь вебийн ачааллах хурд болон хэрэглэгчийн хэрэглээг мэдэгдэхүйц сайжруулна. Үүнийг хэрэгжүүлэх хэд хэдэн арга техникийн хүргэж байна:

  1. Кодын bundle хэмжээг багасгах болон Lazy loading буюу Dynamic import ашиглах

Automatic code splitting: Next.js нь таны кодыг автоматаар жижиг багц болгон хуваадаг. Гэсэн хэдий ч та онцын шаардлагагүй components хэсгүүдийг динамикаар импортлох замаар илүү оновчтой болгох боломжтой.

import dynamic from 'next/dynamic';

const DynamicComponent = dynamic(() => import('../components/HeavyComponent'));

export default function Home() { return ( <div> <h1>Home Page</h1> <DynamicComponent /> </div> ); }

2. Bundle size хэмжээг багасгах

Багцад дүн шинжилгээ хийх: Багцынхаа хэмжээг ойлгож, том хамаатай кодууд, package хэмжээг тодорхойлохын тулд дараагийн багцын дүн шинжилгээ буюу "bundle-analyzer" санг суулган ашиглана.

npm install @next/bundle-analyzer

Next.config.js дотор дараахь байдлаар тохируулна.

// next.config.js const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true', });

module.exports = withBundleAnalyzer({ // additional Next.js config });

3. Төслийн шаардлагагүй сангуудыг цэгцлэх, багасгах

Жишээлбэл: Lodash - Номын санг бүхэлд нь импортлохын оронд зөвхөн хэрэгтэй функцуудыг импортолж болно.

import debounce from 'lodash/debounce';

4. Шаардлагагүй JavaScript-г багасгах

Ашиглагдаагүй код болон хамаарлыг багасгах: Өөрийн package.json-г шалгаж, ашиглагдаагүй хамаарлыг устгана уу. Polyfills зайлсхий: Зөвхөн шаардлагатай полифиллүүдийг оруулна. Орчин үеийн хөтчүүд ES6-ийн ихэнх функцуудыг дэмждэг.

5. Nextjs сангийн Image-ийг оновчтой болгох

Next.js Зургийн оновчтой болгох: Зургийг автоматаар responsive буюу олон төрлийн төхөөрөмжинд нийцтэй болон зургийг автоматаар render хийж ачаалал багатй болгохын тулд суулгасан next/image component-ийг ашиглана уу.

import Image from 'next/image';

const MyImage = () => ( <Image src="/me.png" alt="Picture of the author" width={500} height={500} /> );

Энэ тухай дараагийн нийтлэлд илүү дэлгэрэнгүй оруулах болно

6. React.memo болон useMemo-г ашигла

Optimization: төлөв нь өөрчлөгддөг functional component-ийн React.memo ашиглан төлөв нь өөрчлөгдөөгүй өмнөх төлөвийн утгатай ижил утгатай байгаа тохиолдолд component дахин re-render хийхээс сэргийлэх боломжтой.

Memoization: functional component дахь өөр нэгэн төлөв өөрчлөгдөх үед дахин ачааллах шаардлагагүй тооцоолол, нөөц идсэн хувьсагч, өгөгдлийг өмнөх төлөвөөр нь хадгалах useMemo hook ашиглаж dependency injection хэрэгжүүлж болох юм.

import React, { memo, useMemo } from 'react';

const HeavyComponent = memo(({ data }) => { return <div>{data}</div>; });

const ParentComponent = ({ data }) => { const memoizedData = useMemo(() => computeHeavyData(data), [data]);

return <HeavyComponent data={memoizedData} />; };

7. Non-critical буюу priority багатай JavaScript script кодуудыг түр хойшлуулах

Ачаалах хугацааг хойшлуулах: Javascript thread ачааллах үед чухал биш JavaScript кодуудын таг дээр non-critical-script нэмж системийн ачааллах хурдыг дээшлүүлж болно.

<script src="non-critical-script.js" defer></script>

8. Web Workers

Javascript-ийн Web Worker технологийг ашиглан ачаалал ихтэй тооцоолол шаардсан үйлдэл, script үүдийг core thread ийг ачааллыг чөлөөлж background thread рүү шилжүүлэх боломжтой.

const worker = new Worker(new URL('./worker.js', import.meta.url));

worker.onmessage = (event) => { console.log('Received message from worker:', event.data); };

worker.postMessage('Hello, worker!');

9. Server-Side Rendering оновчтой болгох

Static Generation (SSG): Мэдээлэл нь байнга өөрлчөгдөх шаардлагагүй хуудсуудыг getStaticProps ашиглан хуудсуудыг статик хуудас болгож ачааллыг илт багасгах боломжтой.

export async function getStaticProps() { const data = await fetchData(); return { props: { data }, }; }

Server-Side Rendering (SSR): Хүсэлт бүр дээр Интерактив үйлдэлтэй, хариу үйлдэл үзүүлэх шаардлагатай хуудсанд getServerSideProps-ийг ашиглан сервер талын render ашиглан ачааллыг багасгах боломжтой юм.

Эдгээр стратегийг хэрэгжүүлснээр та Next.js аппликейшн даа JavaScript-н гүйцэтгэлийн хугацааг багасгаж, гүйцэтгэлийг сайжруулж, хэрэглэгчийн туршлага, хэрэглээг сайжруулах боломжтой. Үүнээс гадна та өөрийн төслийг амжилттай болгохын тулд Lighthouse, Web Vitals зэрэг хэрэгслүүдийг ашиглан өөрчлөлтийн үр нөлөөг үргэлж дүн шинжилгээ хийж хэмжиж хэвших нь маш үр дүнтэй арга байх болно.


Whatisane-commercewebsite?

An e-commerce website is similar to a traditional physical retail store, as it provides a platform where customers and businesses can sell or purchase products on a dedicated online platform. However, the key difference between e-commerce and physical retail is that e-commerce transactions are conducted entirely over the internet, rather than in a physical store that requires high rent and operating costs.

Types of e-commerce websites

E-commerce covers a very wide range, but the types of e-commerce platforms can generally be categorized based on their business models as follows:

Business to Consumer (B2C)

The most familiar type of e-commerce site, where businesses sell directly to consumers. For example, buying a T-shirt from an online store.

Business to Business (B2B)

B2B platforms facilitate transactions between two businesses. For example, a clothing company purchasing bulk T-shirts from a wholesale supplier online.

Business to Administration (B2A)

These platforms support electronic services, goods, or tenders between businesses and government organizations.

Consumer to Consumer (C2C)

C2C platforms allow consumers to sell or exchange goods with other consumers. Examples include websites like Unegui and eBay.

Consumer to Business (C2B)

In C2B platforms, individuals offer products or services to businesses. This can include freelancers providing services to companies in specific industries.

Types of products and services in e-commerce

Physical goods

Items such as clothing, furniture, food, and supplies that can be stored in warehouses. Sellers display these products on their e-commerce websites, where customers can browse, save, and purchase them. After purchase, the business ships the product to the customer.

Services

E-commerce websites are also commonly used to sell services such as consulting, maintenance, training, travel services, and online university courses.

Digital products

Digital goods such as online courses, software, podcasts, music, and e-books are becoming increasingly popular on e-commerce platforms. The growth of digital products is driven by rising demand and continues to expand rapidly.
Read Insights
What is an e-commerce website?

Whydoesanorganizationneedawebsite?

A website is an important part of a company’s online presence and has become a key tool for achieving business goals in today’s digital era. There are several reasons why a company needs a website, and in this article, I will briefly highlight some of the most important ones. First, a website is an essential tool for marketing and promotion. It allows a company to showcase its products and services to a wide audience, including potential customers, clients, and business partners. Through a website, a company can communicate its brand message, values, and mission, creating a positive image in the minds of customers. Second, a website provides a platform for e-commerce operations, enabling companies to sell their products and services online. This is especially important in today’s era of online shopping, where customers prefer to shop from home. A website with a strong e-commerce platform can expand a company’s customer base and increase its revenue. Third, a website enhances a company’s credibility and professionalism. It acts as a digital storefront, giving customers an understanding of the company’s operations, culture, and values. A well-designed website creates a positive impression in the minds of customers and encourages trust and business engagement. Fourth, a website provides a platform for customer engagement and support. Through features such as chatbots, FAQs, and contact forms, companies can provide assistance and interact with customers more effectively. A website is accessible to anyone, anywhere, and at any time. This allows companies to expand their reach beyond local markets and attract customers from all over the world. In conclusion, a website is an essential tool for any modern company that wants to succeed in today’s digital age. From marketing and promotion to e-commerce and customer support, websites offer a wide range of benefits that help companies achieve their business goals. Therefore, companies should invest in developing and maintaining high-quality websites that align with their brand message and business objectives.
Read Insights
Why does an organization need a website?

Howtoincreasetraffictoawebsite?

Increasing website traffic requires a combination of SEO, marketing, content strategy, and technical optimization. Here are the most effective methods:
1. SEO (Search Engine Optimization) – Organic Google traffic
SEO is the most sustainable way to generate long-term traffic.
Key actions:
  • Do keyword research (understand what users search for)
  • Write strong titles and meta descriptions
  • Publish regular blog content
  • Use internal linking between pages
  • Build backlinks from other websites
👉 Example: Target high-intent keywords like “web development agency Chicago”
2. Content Marketing
People visit websites to find useful information.
Effective content types:
  • How-to articles (e.g., “How to build a website”)
  • Blog posts
  • Case studies
  • Tutorials
  • Comparison articles
👉 Rule: “Problem-solving content brings traffic”
3. Social Media Marketing
Social media is a fast way to drive traffic.
Platforms:
  • Facebook
  • Instagram
  • LinkedIn (very strong for B2B)
  • TikTok (viral potential)
Strategies:
  • Post short videos (Reels)
  • Share project showcases
  • Publish client testimonials
  • Share case studies
4. Paid Advertising (Ads)
Fastest way to get immediate traffic.
Platforms:
  • Google Ads
  • Facebook / Instagram Ads
  • TikTok Ads
👉 Advantage:
  • Instant visitors
  • Easy to test and optimize
5. Website Performance (Speed & UX)
Slow websites lose traffic.
Optimize:
  • Improve page speed
  • Make mobile-friendly design
  • Optimize Core Web Vitals
  • Reduce JavaScript execution time
  • Optimize images
👉 Slow site = lower Google ranking
6. Email Marketing
Bring visitors back again.
Methods:
  • Newsletters
  • Promotions
  • New content updates
7. Backlinks (Link Building)
One of the strongest SEO ranking factors.
How to get backlinks:
  • Guest posting
  • Business directories
  • Partner websites
  • PR articles
8. Local SEO (for local businesses)
Important for location-based businesses.
Actions:
  • Create Google Business Profile
  • Collect reviews
  • Optimize for “near me” searches
9. Viral & Shareable Content
Content that people naturally share.
Examples:
  • Infographics
  • Useful tools (calculators, checkers)
  • Funny or relatable posts
10. Analytics & Optimization
Track performance and improve continuously.
Tools:
  • Google Analytics
  • Google Search Console
  • Hotjar
Read Insights
How to increase traffic to a website?