Computer Science

Computer Science

In this section, we explore the world of programming, algorithms, networks, and infrastructure

ProgrammingAlgorithmsComputer NetworksTechnologyInfrastructureSoftware EngineeringHardware Engineering

دسته‌بندی‌های مرتبط

مقالات منتخب

connection and cookies in Next.js — Dynamic Rendering and Server-Side Cookie Management

The connection function in Next.js lets you delay rendering until a real user request arrives. This is useful when you want runtime behavior (like Math.random or new Date) without using Dynamic APIs. The cookies API allows reading cookies in Server Components and reading/writing them in Server Actions or Route Handlers. This article explains how both features work, with practical examples and important caveats.

/persian/article-fa/nextjs-connection-cookies-dynamic-rendering-server-components-cookie-api

draftMode, fetch, and forbidden in Next.js — Managing Preview Mode, Data Caching, and Access Control

Next.js offers powerful tools for dynamic rendering and secure access control. The draftMode function lets you enable or disable preview mode and check its status. The fetch API is extended with cache, revalidate, and tags options for precise control over data freshness. The forbidden function throws a 403 error when access is denied, useful for role-based protection. This article explains how to use all three features with practical examples.

/persian/article-fa/nextjs-draftmode-fetch-cache-forbidden-auth-server-components

generateImageMetadata, generateSitemaps, and generateViewport in Next.js — Dynamic Metadata for Images, Sitemaps, and Viewport Settings

Next.js offers powerful metadata generation tools like generateImageMetadata, generateSitemaps, and generateViewport. These functions allow you to programmatically create icons and Open Graph images, split large sitemaps into multiple files, and customize viewport settings based on route parameters or user preferences. This article explains how each function works and how to use them effectively.

/persian/article-fa/nextjs-generateImageMetadata-sitemaps-viewport-dynamic-metadata

generateStaticParams in Next.js — Prebuilding Dynamic Routes at Build Time

The generateStaticParams function in Next.js allows you to prebuild dynamic routes at build time instead of rendering them on-demand. It replaces getStaticPaths from the Pages Router and supports single, multiple, and catch-all segments. You can generate routes from the bottom up or top down, and control fallback behavior using dynamicParams. This article explains how to use generateStaticParams with practical examples and configuration tips.

/persian/article-fa/nextjs-generateStaticParams-dynamic-routes-static-generation-isr

A Complete Guide to Using metadata and generateMetadata in Next.js

In modern versions of Next.js, managing page metadata is more powerful and intuitive than ever. Metadata is automatically injected into the <head> of your pages and plays a vital role in SEO, social sharing, and user experience. This guide explains the two main ways to define metadata: using the static metadata object and the dynamic generateMetadata function.

/persian/article-fa/nextjs-metadata-generateMetadata-seo-dynamic-head-tags

headers, ImageResponse, notFound, and permanentRedirect in Next.js — Request Handling, Dynamic Images, Errors, and Redirects

Next.js offers powerful tools for handling HTTP requests and responses in Server Components. The headers function lets you read incoming request headers. ImageResponse allows you to generate dynamic images using JSX and CSS. The notFound function renders a custom 404 page, and permanentRedirect enables permanent redirection to another route. This article explains how to use each feature with practical examples.

/persian/article-fa/nextjs-headers-imageresponse-notfound-permanentredirect-server-components-routing

NextRequest and NextResponse in Next.js — Managing Cookies, Headers, Redirects, and Rewrites

Next.js extends the native Web Request and Response APIs with NextRequest and NextResponse, offering powerful tools for managing cookies, headers, redirects, rewrites, and JSON responses. These utilities simplify server-side logic and improve control over routing, personalization, and security. This guide walks through their capabilities with practical examples and best practices.

/persian/article-fa/nextjs-nextrequest-nextresponse-cookies-headers-redirect-rewrite-api

redirect and refresh in Next.js — Smart Redirects and Client Refreshing via Server Actions

The redirect function in Next.js allows you to navigate users to a new route, returning either a 307 or 303 HTTP response depending on context. It works in Server Components, Client Components, Route Handlers, and Server Actions. The refresh function is used exclusively within Server Actions to refresh the client router. This article explains how both functions work, with practical examples and key considerations.

/persian/article-fa/nextjs-redirect-refresh-server-actions-client-router-http-status

Handling Authorization and Caching in Next.js: A Developer’s Guide

Next.js introduces powerful experimental features for access control and smart caching. This guide covers the unauthorized() function for custom 401 handling, unstable_cache for persistent memoization, updateTag for instant cache invalidation, and useLinkStatus for inline navigation feedback. Learn how to use these tools to build secure, performant, and responsive applications.

/persian/article-fa/nextjs-authorization-caching-unauthorized-updateTag-unstableCache-useLinkStatus

Advanced Client-Side Routing and Performance Hooks in Next.js

Next.js provides a rich set of client-side hooks and caching utilities that empower developers to build dynamic, responsive, and secure applications. From reading route parameters to tracking navigation state and reporting performance metrics, this guide walks you through the most important tools available in the App Router.

/persian/article-fa/nextjs-client-hooks-routing-performance-useParams-useRouter-updateTag

Network Fundamentals and Introduction to Windows Server 2025

This article explores the basics of computer networks and introduces Windows Server 2025. It begins with fundamental concepts such as hosts, nodes, and client-server architecture. Next, it explains IP addressing and subnetting, followed by an overview of the Network Operating System (NOS). The article then highlights the editions and improvements of Windows Server 2025 compared to Windows Server 2022. System requirements, installation media preparation, and Windows Admin Center setup are also covered. By the end, readers will gain both theoretical knowledge and practical skills for managing modern IT infrastructures.

/persian/article-fa/network-fundamentals-and-introduction-to-windows-server-2025

Types of Computer Networks and Core Components

This article explores the different types of computer networks—PAN, LAN, MAN, and WAN—based on coverage and purpose. It explains how clients, servers, hosts, and nodes function within networks, and highlights the roles of switches and routers in communication. By the end, readers will understand both the classifications of networks and the essential components that make them operate effectively.

/persian/article-fa/types-of-computer-networks-and-core-components
Computer Science | Dr. Shahin Siami