<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Shubham Chaturvedi on Medium]]></title>
        <description><![CDATA[Stories by Shubham Chaturvedi on Medium]]></description>
        <link>https://medium.com/@shubhamchat224122?source=rss-2a139ad94bd7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iDIsUQtziK5EHFqKuZo_Dg.png</url>
            <title>Stories by Shubham Chaturvedi on Medium</title>
            <link>https://medium.com/@shubhamchat224122?source=rss-2a139ad94bd7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:38:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shubhamchat224122/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Do You Really Know How to Scale sitemap.xml for Millions of Dynamic Pages?]]></title>
            <link>https://medium.com/dev-simplified/do-you-really-know-how-to-scale-sitemap-xml-for-millions-of-dynamic-pages-1bfaf779007d?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bfaf779007d</guid>
            <category><![CDATA[sitemap-scale]]></category>
            <category><![CDATA[dynamic-sitemap]]></category>
            <category><![CDATA[sitemaps-and-seo]]></category>
            <category><![CDATA[sitemap-website]]></category>
            <category><![CDATA[sitemap]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Thu, 03 Jul 2025 04:51:44 GMT</pubDate>
            <atom:updated>2025-07-03T04:51:44.309Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fa9kdKTkYSu6bFh4kpUdng.png" /><figcaption>Do you really know sitemap?</figcaption></figure><p>Let me give you a scenario where you have an e-commerce site that has just hit 10,000 Products. Each product is a page you want to be indexed, but sitemap is now a 30MB file, and is taking forever to crawl. How would you manage sitemap.xml file? A common solution could be, dump all the URLs inside the sitemap.xml , but then a major concerns arise, how to scale it?</p><h3>Why is this thing a problem?</h3><p>sitemap.xml file has so many limitations</p><ul><li>sitemap.xml file size can’t be more than 50 MB.</li><li>sitemap.xml file can’t contain more than 50000 URLs.</li></ul><p>Several other limitations exist, but these are deal breakers for scaling it.</p><p>When you are dealing with more than 50K URLs, then there has to be some sort of strategy; we just can’t handle that manually, updating it on each page change.</p><p>Now let’s talk about the solutions, here are a few of the most practical and simple solutions we can follow to scale our sitemap for millions of pages without any issue.</p><h3>Approach 1: Sitemap Index files</h3><p>Most obvious solution, similar we do in the databases as well, just one thing to keep in mind, we are still creating the sitemaps, just in different files with one main file having all URLs of all the files. eg: for an e-commerce site, we can have a folder and file structure similar. In case of still one file has more than 50k URLs, then just create multiple files.</p><pre>sitemap-index.xml<br>├── products/<br>│   ├── products-electronics-1.xml (50,000 URLs)<br>│   ├── products-electronics-2.xml (50,000 URLs)<br>│   ├── products-clothing-1.xml (50,000 URLs)<br>│   └── products-clothing-2.xml (45,000 URLs)<br>├── categories/<br>│   └── categories.xml (5,000 URLs)<br>├── brands/<br>│   └── brands.xml (2,000 URLs)<br>└── content/<br>    ├── blog.xml (15,000 URLs)<br>    └── pdf.xml (6,000 URLs)</pre><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br><br>&lt;sitemapindex xmlns=&quot;http://www.sitemaps.org/schemas/sitemap/0.9&quot;&gt;<br><br>  &lt;sitemap&gt;<br>    &lt;loc&gt;https://example.com/sitemaps/products-1.xml&lt;/loc&gt;<br>    &lt;lastmod&gt;2024-06-20T10:30:00Z&lt;/lastmod&gt;<br>  &lt;/sitemap&gt;<br>  &lt;sitemap&gt;<br>    &lt;loc&gt;https://example.com/sitemaps/products-2.xml&lt;/loc&gt;<br>    &lt;lastmod&gt;2024-06-20T10:35:00Z&lt;/lastmod&gt;<br>  &lt;/sitemap&gt;<br>  &lt;sitemap&gt;<br>    &lt;loc&gt;https://example.com/sitemaps/categories.xml&lt;/loc&gt;<br>    &lt;lastmod&gt;2024-06-19T15:20:00Z&lt;/lastmod&gt;<br>  &lt;/sitemap&gt;<br>  &lt;sitemap&gt;<br>    &lt;loc&gt;https://example.com/sitemaps/blog.xml&lt;/loc&gt;<br>    &lt;lastmod&gt;2024-06-20T08:45:00Z&lt;/lastmod&gt;<br>  &lt;/sitemap&gt;<br><br>&lt;/sitemapindex&gt;</pre><h3>Approach 2: Dynamic Sitemap Generation</h3><p>For scaling more than 50k pages, we can’t rely on any method of static file generation, so we have to make all the sitemaps dynamically. There are so many npm packages like <a href="https://www.npmjs.com/package/sitemap"><strong>sitemap</strong></a><strong>, </strong><a href="https://www.npmjs.com/package/xmlbuilder2"><strong>xmlbuilder2</strong></a>, and <a href="https://www.npmjs.com/package/fast-xml-parser"><strong>fast-xml-parser</strong></a> that can be helpful while creating the sitemaps.</p><h3>Approach 3: Prioritized Strategy for Sitemap</h3><p>We can have more than 50K pages, but not all the pages are created with equal weightage. We can put some priority on pages to ensure our most important pages get crawled first.</p><p>We can easily have 3 types of priority levels:</p><ul><li><strong>High Priority (1.0)</strong>: Homepage, main category page, top-selling products</li><li><strong>Medium Priority(0.7)</strong>: Product pages, subcategories, popular blogs</li><li><strong>Low Priority(0.3)</strong>: Archive pages, less important content</li></ul><p><strong>Code Example</strong>: Put the &lt;priority&gt; tag and put the number</p><pre>&lt;url&gt;<br>  &lt;loc&gt;https://example.com/bestselling-laptop&lt;/loc&gt;<br>  &lt;lastmod&gt;2024-06-20T10:00:00Z&lt;/lastmod&gt;<br>  &lt;changefreq&gt;weekly&lt;/changefreq&gt;<br>  &lt;priority&gt;1.0&lt;/priority&gt;<br>&lt;/url&gt;</pre><h3>Approach 4: Automated Sitemap Management</h3><p>Till now, we have managed a large number of URLs in the sitemap using indexing, generating the sitemap dynamically, and putting the priority tags for better crawler directions, but we are still doing a few steps manually. Now, at this level, we can now easily automate the entire procedure at this stage.<br>Without requiring human involvement, we can now design a system that updates sitemaps automatically whenever content changes.</p><p><strong>Key Components:</strong></p><ul><li><strong>Database Triggers: </strong>Update the specific sitemap when content is modified or added.</li><li><strong>CMS triggers: </strong>All the cms like Strapi provide some webhooks, in case of content changes, trigger them and generate a new sitemap file.</li><li><strong>Scheduled Jobs: </strong>Update or rebuild sitemaps during the low/less traffic hours. (Better to create a cron job on the server)</li><li><strong>Incremental Updates: </strong>Only regenerate changed sitemaps, not all the sitemaps. (This avoids unnecessary regeneration)</li><li><strong>CDN Integration: </strong>Distribute sitemaps globally for faster access.</li></ul><h3>Approach 5: Multi-Domain Strategy</h3><p>For large enterprises with multiple domains or subdomains, create separate sitemap strategies for each.</p><p>Example Structure:</p><pre>main-domain.com/sitemap-index.xml<br>├── shop.main-domain.com/sitemap.xml<br>├── blog.main-domain.com/sitemap.xml<br>└── support.main-domain.com/sitemap.xml</pre><h3>Common Mistakes to Avoid</h3><h3>1. Including Non-Indexable URLs</h3><p>Never add URLs that either return 404 or 301 redirects or have <strong>noindex </strong>meta tags. This mainly wastes crawl budget and confuses search engines (In short, not a good practice).</p><p><strong>Wrong way:</strong></p><pre>&lt;url&gt;<br>  &lt;loc&gt;https://example.com/out-of-stock-product&lt;/loc&gt; &lt;!-- 404 page --&gt;<br>&lt;/url&gt;<br>&lt;url&gt;<br>  &lt;loc&gt;https://example.com/admin/dashboard&lt;/loc&gt; &lt;!-- noindex page --&gt;<br>&lt;/url&gt;</pre><p><strong>Right way:</strong> Add only pages that are live, indexable, and return 200 status codes.</p><h3>2. Robots.txt was not updated</h3><p>Developers often forget or neglect to include references to sitemaps in robots.txt files, even when they put so much effort into building the sitemap.</p><p><strong>Missing Sitemap Code Example:</strong></p><pre>User-agent: *<br>Disallow: /admin</pre><p><strong>Right Way Code Example:</strong></p><pre>User-agent: *<br>Disallow: /admin/<br>Sitemap: https://example.com/sitemap-index.xml</pre><h3>3. Using Absolute URLs Inconsistently (HTTPS and HTTP both)</h3><p>Sometimes mixing HTTP and HTTPS requests can also result in bad or unexpected results, as it creates confusion for the crawler.</p><p><strong>Wrong Way Code Example:</strong></p><pre>&lt;loc&gt;http://example.com/page1&lt;/loc&gt;<br>&lt;loc&gt;https://www.example.com/page2&lt;/loc&gt;</pre><p><strong>Consistent:</strong> Stick to one canonical format throughout (Either HTTP or HTTPS).</p><h3>4. Overusing Priority Tags</h3><p>This is also the most common mistake developers make; they put everything with the highest priority, which can also cause a bad result, as we are wasting crawlers’ expense.</p><p>Putting each page with priority 1.0 defects, the purpose we should rank them from 0.4–0.8, as discussed earlier in this blog Approach 4.</p><p><strong>Wrong Way:</strong> Everything is set to &lt;priority&gt;1.0&lt;/priority&gt;</p><p><strong>Right Way:</strong> Reserve 1.0 for your most important 5–10 pages only.</p><h3>5. Generating Massive Single Files</h3><p>Don’t be lazy and create a single file of 49MB Search engines prefer smaller and focused files. Try the indexing methods we discussed in Approach 1.</p><p><strong>Bad Way:</strong> One file with 45,000 URLs</p><p><strong>Right Ways:</strong> Multiple files with 10,000–15,000 URLs each and proper indexing.</p><h3>6. Ignoring Mobile and International Versions</h3><p>Not including mobile-specific or alternate language versions misses indexing opportunities.</p><h3>7. Setting Unrealistic Change Frequencies</h3><p>Don’t mark static pages as changefreq=&quot;daily&quot; - It reduces credibility with search engines.</p><h3>Testing &amp; Validation</h3><h4>Before Going Live</h4><ul><li>Test with Google’s <a href="https://www.xml-sitemaps.com/validate-xml-sitemap.html">Sitemap Validator</a></li><li>Check XML syntax with online validators</li><li>Make that 200 status codes are returned by every URL.</li><li>Test sitemap accessibility from different locations (Geographical location)</li><li>Ensure file sizes are under limits</li></ul><h4>Regular Maintenance</h4><ul><li>Weekly sitemap health checks</li><li>Monthly URL audit (remove 404s, redirects)</li><li>Quarterly performance review</li><li>Monitor Google Search Console for sitemap errors</li></ul><h3>Conclusion</h3><p>It’s not too hard to manage sitemaps having millions of pages. You just need to manage it from the start, try to create a small system around it, and it should be good to go.</p><p>Start with sitemap index files and then add automated systems that will create and update your sitemaps as your site expands.</p><p>It’s similar to create and organizing a library system, where you need a robots file system (indexing system) that can hold more books without breaking.</p><p>Post a comment below if you have any questions or discuss this more.</p><p><strong>At Dev Simplified, We Value Your Feedback </strong>📊</p><p>👉<strong> If you like the article, then please support the writer by clapping for this article.</strong></p><p>👉<strong> <em>Have any suggestions? Let us know in the comments!</em></strong></p><p>👉<strong> </strong><a href="https://medium.com/dev-simplified"><strong><em>Subscribe for free and join our growing community!</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bfaf779007d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dev-simplified/do-you-really-know-how-to-scale-sitemap-xml-for-millions-of-dynamic-pages-1bfaf779007d">Do You Really Know How to Scale sitemap.xml for Millions of Dynamic Pages?</a> was originally published in <a href="https://medium.com/dev-simplified">Dev Simplified</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Have You Ever Tried Google Docs As a Dynamic Template For Generating Certificates, Invoices…]]></title>
            <link>https://medium.com/dev-simplified/have-you-ever-tried-google-docs-as-a-dynamic-template-for-generating-certificates-invoices-74abcafde3e0?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/74abcafde3e0</guid>
            <category><![CDATA[google-drive-api]]></category>
            <category><![CDATA[google-api]]></category>
            <category><![CDATA[google-docs]]></category>
            <category><![CDATA[html-templates]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 16:27:29 GMT</pubDate>
            <atom:updated>2025-06-22T16:27:29.947Z</atom:updated>
            <content:encoded><![CDATA[<h3>Have You Ever Tried Google Docs As a Dynamic Template For Generating Certificates, Invoices, Reports</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uBCEZ3IIxisGnIUizjaBsA.png" /><figcaption>Have you ever tried google docs as dynamic template</figcaption></figure><p>Well, it’s quite a classic problem we face pretty often, and we solve it using some PDF library or maybe creating the whole thing using HTML and CSS (already sounds tedious, right?).</p><p>Last week, I needed to solve something similar where I needed to generate some dynamic certificate on some API hit(on the server side), where the certificate template was quite tricky, having two columns with tricky formatting done on the Google Docs, and the requirement was to create the same template.</p><p>Our requirement was mainly to generate the same template, but we had little time to develop the template using any method (using a library or HTML template).</p><p>I discussed this use case with one of my college seniors and got to know a pretty cool trick,</p><blockquote><em>We can use </em>Google Docs itself as a template. using Google Docs and Drive APIs, we can generate documents and PDF<em> files with relative ease.</em></blockquote><h3>Using Google Docs as Dynamic Templates — Complete Setup Guide</h3><h3>Step 1: Google Cloud Platform Setup (It’s free to some extent)</h3><h3>1.1 Create a Google Cloud Project</h3><ol><li>Go to <a href="https://console.cloud.google.com/">Google Cloud Console</a></li><li>Click “New Project”</li><li>Enter project name (e.g., “certificate-generator”)</li><li>Click “Create”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2jPvb5vOVGlgp5Jsd4oilA.png" /><figcaption>create project sample screenshot</figcaption></figure><h3>1.2 Enable Required APIs</h3><ol><li>In your project dashboard, go to “APIs &amp; Services” → “Library”</li><li>Search and enable these APIs:</li></ol><ul><li><strong>Google Docs API</strong></li><li><strong>Google Drive API</strong></li></ul><p>f3. Click “Enable” for each</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sb4r19638KzmTYoaX9XhMg.png" /><figcaption>Sample Google Docs pic, do the same for Google Drive</figcaption></figure><h3>1.3 Create Service Account</h3><ol><li>Go to “APIs &amp; Services” → “Credentials”</li><li>Click “Create Credentials” → “Service Account”</li><li>Enter service account details:</li></ol><ul><li>Name: docs-template-service</li><li>Description: Service account for document template generation</li></ul><p>4. Click “Create and Continue”</p><p>5. Skip role assignment for now → Click “Done”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7SFRkpSpUGHWXW-XjgRjPw.png" /><figcaption>This is where to find Create credentials</figcaption></figure><h3>1.4 Generate Service Account Key</h3><ol><li>Click on your newly created service account</li><li>Go to the “Keys” tab</li><li>Click “Add Key” → “Create New Key”</li><li>Choose “JSON” format</li><li>Download and save the JSON file securely (never track this file with git, treat it just like .env )</li><li>(Optional) I usually rename the file name with relavent to the project and feature (<strong><em>service-account-key.json</em></strong>).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sBtyCHjRiSlbUNTPyeb3UQ.png" /><figcaption>this is the client email , you can note this one</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m10ydYFj83B_SB8l--Q1qQ.png" /><figcaption>way to find the key option</figcaption></figure><h3>Step 2: Template Setup</h3><h3>2.1 Create Your Google Docs Template</h3><ol><li>Create a new Google Doc with your certificate/invoice layout</li><li>Add placeholder text for dynamic content:</li></ol><pre>CERTIFICATE OF THE YEAR FOR SOME RANDOM COURSE <br><br>This acknowledges that you got some random achievement on {{COMPLETION_DATE}}, {{STUDENT_NAME}} successfully completed the random course on planet earth {{COURSE_NAME}}.<br><br>We officially acknowledge the effort and commitment rendered throughout the program.<br><br>Teacher: {{INSTRUCTOR_NAME}} {{COMPLETION_DATE}} stands for the date.<br>It is _____________________________.Signature of the Instructor and Institution Seal<br><br>Your Company&#39;s Website<br><br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*MkIh06eSEanMNiLm0bHu6Q.png" /><figcaption>Create a basic template like this for yourselfCreate a basic template like this for yourself</figcaption></figure><h3>2.2 Share Template with Service Account</h3><ol><li>In your Google Doc, click “Share”</li><li>Add your service account email (found in the JSON file as client_email)</li><li>Give “Editor” permissions</li><li>Copy the document ID from the URL</li></ol><h3>Step 3: Implementation</h3><h3>3.1 Install Required Libraries</h3><pre>npm install googleapis express</pre><h3>3.2 Basic Implementation Code</h3><pre>const express = require(&#39;express&#39;);<br>const { google } = require(&#39;googleapis&#39;);<br><br>const app = express();<br>app.use(express.json());<br>// now setting up Google API auth , using service account key file we downloaded<br>// it let&#39;s us interact with both google docs and drive<br>const auth = new google.auth.GoogleAuth({<br>  keyFile: &#39;./service-account-key.json&#39;,<br>  scopes: [&#39;https://www.googleapis.com/auth/documents&#39;, &#39;https://www.googleapis.com/auth/drive&#39;]<br>});<br><br>//Initialize docs and drive clients with auth for access<br>const docs = google.docs({ version: &#39;v1&#39;, auth });<br>const drive = google.drive({ version: &#39;v3&#39;, auth });<br><br>//creating the route to generate the custom dynamic pdf<br>app.post(&#39;/generate-pdf&#39;, async (req, res) =&gt; {<br>  try {<br>    const { templateId, data } = req.body;<br><br>    //step1: creating a copy of Google Docs template<br>    // we want to do the changes in the copied template , so the original remains unchanged<br>    // Copy template<br>    const copy = await drive.files.copy({<br>      fileId: templateId,<br>      requestBody: { name: `Generated_${Date.now()}` }<br>    });<br><br>    // Step2: Making placeholder for replacement operation<br>    const requests = Object.entries(data).map(([key, value]) =&gt; ({<br>      replaceAllText: {<br>        containsText: { text: `{{${key}}}`, matchCase: true },<br>        replaceText: value<br>      }<br>    }));<br>      <br>    // Step 3: Apply the placeholder replacements to the copied document (actual work happening here 🤪)<br>    await docs.documents.batchUpdate({<br>      documentId: copy.data.id,<br>      requestBody: { requests }<br>    });<br><br>    // Step 4: Export the final Google Doc as a PDF <br>    const pdf = await drive.files.export({<br>      fileId: copy.data.id,<br>      mimeType: &#39;application/pdf&#39;<br>    }, { responseType: &#39;stream&#39; });<br><br>    // Clean up<br>    await drive.files.delete({ fileId: copy.data.id });<br><br>    res.setHeader(&#39;Content-Type&#39;, &#39;application/pdf&#39;);<br>      <br>    res.setHeader(&#39;Content-Disposition&#39;, &#39;attachment; filename=&quot;certificate.pdf&quot;&#39;);<br>      <br>    pdf.data.pipe(res);<br><br>  } catch (error) {<br>    res.status(500).json({ error: error.message });<br>  }<br>});<br><br>app.listen(3000, () =&gt; console.log(&#39;PDF API running on port 3000&#39;));</pre><pre>curl --location &#39;http://localhost:3000/generate-pdf&#39; \<br>--header &#39;Content-Type: application/json&#39; \<br>--data &#39;{<br>w    &quot;templateId&quot;: &quot;1GiaWPImZcebajjbqeoaXXB00iIWIDFfCsx99ist0woL&quot;,<br>    &quot;data&quot;: {<br>      &quot;STUDENT_NAME&quot;: &quot;Shubham Chaturvedi&quot;,<br>      &quot;COURSE_NAME&quot;: &quot;JavaScript, never easy&quot;, <br>      &quot;COMPLETION_DATE&quot;: &quot;1 Jan,2025&quot;,<br>      &quot;INSTRUCTOR_NAME&quot;: &quot;Always tuff Random JS Instructor&quot;<br>    }<br>}&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tz0JyW6VUeWBwQpXkp4hUw.png" /><figcaption>response sample screenshot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*ERb5gT6sfUDSeLbwSurWaA.png" /><figcaption>Output pdf as exact same docs format with dynamic data</figcaption></figure><h3>Benefits of This Approach</h3><p>1. Non-devs (like PMs) can edit templates 😇<br>2. Zero layout headaches (thank god)<br>3. Professional formatting out of the box (It’s Google Docs)<br>4. Built-in collaboration features (Yeah, just keeps adding editors)</p><blockquote>Perfect for <strong>certificates, invoices, reports, and contracts</strong></blockquote><h3>Security Considerations</h3><ul><li>Store service account keys securely</li><li>Use environment variables for sensitive data</li><li>Implement proper error handling</li><li>Set up appropriate API quotas</li><li>Regular key rotation</li></ul><h3>Rate Limits &amp; Quotas</h3><p><strong>Google Docs API Limits</strong></p><ul><li><strong>Daily quota</strong>: 20,000 requests per day, Read request 100 req/100sec, Write request 100 req/100sec</li></ul><p><strong>Google Drive API Limits</strong></p><ul><li><strong>Queries per 100 seconds</strong>: 1,000 requests per 100 seconds per user</li><li><strong>Queries per day</strong>: 1,000,000,000 requests per day</li><li><strong>File uploads</strong>: 750 requests per 100 seconds per user</li></ul><p><strong>Common Issues:</strong></p><ul><li>Service account permissions: Ensure the service account has access to your template</li><li>API limits: Implement rate limiting for bulk operations (may be create more than 1 service account and do a kind of load limiting)</li><li>Template sharing: Verify that the document is shared with the service account email</li></ul><p>This method preserved the precise template design that our client had approved while saving us a great deal of development time!</p><p>Please feel free to post a comment below if you have any questions or would like to discuss this more. 😊</p><p><strong>At Dev Simplified, We Value Your Feedback </strong>📊</p><p>👉<strong> Want to write with us? Join us on our</strong><a href="https://chat.whatsapp.com/KZdEQW25op2Ij7PRFEfzkj"><strong> whatsapp channel</strong></a></p><p>👉<strong> <em>Have any suggestions? Let us know in the comments!</em></strong></p><p>👉<strong> </strong><a href="https://medium.com/dev-simplified"><strong><em>Subscribe for free and join our growing community!</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74abcafde3e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dev-simplified/have-you-ever-tried-google-docs-as-a-dynamic-template-for-generating-certificates-invoices-74abcafde3e0">Have You Ever Tried Google Docs As a Dynamic Template For Generating Certificates, Invoices…</a> was originally published in <a href="https://medium.com/dev-simplified">Dev Simplified</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Happens When You Type a URL in Your Browser?]]></title>
            <link>https://medium.com/@shubhamchat224122/what-happens-when-you-type-a-url-in-your-browser-b86932dfd9ee?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b86932dfd9ee</guid>
            <category><![CDATA[web-network]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[rendering]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Mon, 16 Jun 2025 03:32:40 GMT</pubDate>
            <atom:updated>2025-06-16T03:32:40.095Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve always wondered — how does it work when we type something like www.google.com into the browser and hit <strong>Enter</strong>? Like <em>magic</em>, it shows the page in seconds. (Okay, depends on your internet speed, but it’s 2025 now — most of us are flying on 5G 😂)</p><p>So I decided to dig deep and figure out what’s really happening behind the scenes. And let me tell you — it’s way more complicated than I imagined!</p><p>But don’t worry — <strong>you don’t need to go through all the tech jargon</strong>. I’ve written it all down here in a fun, story-like format that you’ll remember forever 😎</p><h3>Step 0: You Type a URL and Hit Enter</h3><p>Let’s say you type:<br> https://colla8code.vercel.app<br> and press <strong>Enter</strong>.</p><p>Seems easy right? but it’s a proper multi step process happens in behind , here are those steps .</p><h3>Step 1: URL Parsing</h3><p>First, your <strong>browser reads and understands the URL</strong>.</p><p>It breaks it into:</p><ul><li><strong>Protocol</strong>: https – says we need a secure connection</li><li><strong>Domain</strong>: colla8code.vercel.app – tells which site to visit</li><li><strong>Path</strong>: / or /login – says which page we want</li></ul><p>Think of it like your brain breaking down an address:<br> “Go to John’s house (domain), through the main gate (path), and talk politely (protocol).”</p><h3>Step 2: Browser Checks Its Memory (Cache Lookup)</h3><p>Before doing anything else, the browser checks:</p><ul><li><strong>Do I already have this page saved?</strong> (like having a chocolate stash at home instead of going to the store every time 🍫)</li></ul><h3>Two types of cache checks:</h3><ul><li><strong>HTTP Cache</strong>: Do I already have the full page saved from last time?</li><li><strong>DNS Cache</strong>: Do I remember the IP address of this site?</li></ul><p>If it finds both — boom 💥 — it loads the page instantly.<br> If not, it goes to the next steps…</p><h3>Step 3: DNS Lookup — Finding the IP Address</h3><p>Imagine URLs are names, but the internet speaks in <strong>IP addresses</strong> (like phone numbers).</p><p>So your browser says:</p><blockquote><em>“Okay, I know the name, but what’s the number I should call?”</em></blockquote><p>It searches in layers:</p><ol><li>Browser DNS Cache</li><li>OS (Windows/Linux/Mac) DNS Cache</li><li>Hosts file on your computer</li><li>Your Wi-Fi router’s memory</li><li>Your internet provider’s DNS (like Jio, Airtel)</li><li>If not found, it asks <strong>public DNS servers</strong> like Google (8.8.8.8) or Cloudflare (1.1.1.1)</li></ol><p>If still not found:</p><ul><li>It goes all the way to <strong>Root DNS Servers</strong></li><li>Then to <strong>TLD servers</strong> (like .com, .org, .app)</li><li>Then to the <strong>authoritative DNS</strong> for vercel.app</li><li>Finally, it gets back an IP address like 93.184.216.34</li></ul><p>Now we know <strong>where</strong> to send our request!</p><h3>Step 4: TCP Handshake — Making the Connection</h3><p>Now that your browser knows the IP, it says:</p><blockquote><em>“Hey Server, can we talk?”</em></blockquote><p>And the server replies:</p><blockquote><em>“Sure, I’m ready.”</em></blockquote><p>And the browser responds:</p><blockquote><em>“Cool, let’s start.”</em></blockquote><p>This is called a <strong>3-way TCP handshake</strong>:</p><ol><li>SYN →</li><li>SYN-ACK ←</li><li>ACK →</li></ol><p>Now both sides are connected and ready to exchange data!</p><h3>Step 5: TLS Handshake — Securing the Connection (for HTTPS)</h3><p>Since we used https, we need to <strong>encrypt</strong> the conversation (so no hacker can listen).</p><p>Here’s what happens:</p><ul><li><strong>Browser sends</strong> a “Hello” with:</li><li>Supported encryption styles</li><li>Random number (for key generation)</li><li>Domain name it wants to visit</li><li><strong>Server replies</strong> with:</li><li>Chosen encryption style</li><li>A certificate proving its identity</li><li><strong>Browser checks</strong>:</li><li>Is the certificate real?</li><li>Is it expired?</li><li>Is it really for colla8code.vercel.app?</li></ul><p>If all is good, the browser creates a <strong>secret key</strong>, encrypts it using server’s public key, and sends it over.</p><p>Now both browser and server have the <strong>same secret key</strong>, and can talk <strong>securely</strong> 🔐</p><h3>Step 6: HTTP Request — Asking for the Page</h3><p>Now the browser sends the actual request:</p><pre>GET / HTTP/1.1  <br>Host: colla8code.vercel.app  <br>User-Agent: Chrome/123</pre><p>This is like saying:</p><blockquote><em>“Hey server, give me the homepage of this site.”</em></blockquote><p>If the server supports <strong>HTTP/2 or HTTP/3</strong>, it might send and receive things faster using those.</p><h3>Step 7: Server Receives the Request</h3><p>Now on the server:</p><ul><li>It might be running a web server like <strong>Nginx</strong>, <strong>Apache</strong>, or <strong>Node.js</strong></li><li>It reads the request</li><li>It checks if the page is static (already stored) or dynamic (needs to be generated)</li><li>It might fetch some data from a <strong>database</strong>, run some backend logic, etc.</li></ul><p>Then it sends back something like:</p><pre>HTTP/1.1 200 OK  <br>Content-Type: text/html  <br>&lt;html&gt;...&lt;/html&gt;</pre><h3>Step 8: Browser Receives the Response</h3><p>Now your browser has the HTML code for the page.</p><p>It says:</p><blockquote><em>“Awesome, let’s start drawing this!”</em></blockquote><h3>Step 9: Browser Builds the Page</h3><p>This step is called <strong>rendering</strong>, and it’s a lot of work:</p><ul><li>Parses HTML → builds a <strong>DOM Tree</strong></li><li>Parses CSS → builds <strong>CSSOM Tree</strong></li><li>Combines both to calculate layout</li><li>Paints pixels on screen</li><li>Fetches more stuff like:</li><li>Images</li><li>Fonts</li><li>JavaScript files</li><li>External styles</li><li>Runs JavaScript (some may block rendering)</li></ul><blockquote><em>If the site uses a </em><strong><em>CDN</em></strong><em>, many of these assets come from nearby servers to speed things up</em></blockquote><h3>Step 10: Interactivity Begins</h3><p>Now:</p><ul><li>Buttons work</li><li>Sliders slide</li><li>Menus open</li><li>Event listeners are attached</li></ul><p>The site is now <strong>fully interactive</strong> 🎉</p><h3>😂Bonus: What if There’s an Error?</h3><p>If anything goes wrong:</p><ul><li>DNS failed? You get Server not found</li><li>TLS certificate expired? You see Connection not secure</li><li>Server down? You get 500 Internal Server Error</li><li>Page not found? You get 404 Page Not Found</li></ul><h3>Summary (10 min delivery)</h3><p>Typing a URL feels simple, but here’s the magic happening behind the scenes:</p><ol><li>Browser breaks down the URL</li><li>Checks if it already knows the answer</li><li>Finds the IP address (via DNS)</li><li>Makes a connection with the server</li><li>Sets up a secure tunnel</li><li>Sends a request for the page</li><li>Server sends the response</li><li>Browser draws the page</li><li>Loads extra files</li><li>Makes it interactive</li></ol><p>All this happens in milliseconds!</p><p>So next time you open a website, remember — it’s not just clicking Enter, it’s like calling up a restaurant, checking their ID, placing your order, getting your meal cooked, and served hot — all in the blink of an eye</p><p>For any queries or further discussions, feel free to leave a comment below or reach out to me on <a href="https://linkedin.com/in/shubhamchat03">LinkedIn</a>! 😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b86932dfd9ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chasing a Ghost Bug in React Lazy Loading: A CSS Story]]></title>
            <link>https://medium.com/@shubhamchat224122/chasing-a-ghost-bug-in-react-lazy-loading-a-css-story-c4c7d33fafe2?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4c7d33fafe2</guid>
            <category><![CDATA[web-vitals]]></category>
            <category><![CDATA[core-web-vitals]]></category>
            <category><![CDATA[frontend-optimization]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[web-performance]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Mon, 09 Jun 2025 03:32:12 GMT</pubDate>
            <atom:updated>2025-06-09T03:32:12.980Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gAorEywf2I3tBAekswll3w.png" /></figure><h3>Have you ever worked on the #frontend #optimization ?</h3><p>I was working on one of my large scale projects having 100’s of pages, it has lot of legacy code and the requirement was to make the performance from 10 to 70 atleast, there are many things I did and one of them was code-splitting using #lazy and #Suspense.</p><p>Do you know , you can’t load third party css in modal’s if you are using lazy loading and suspense ?</p><p>There was this library we were using for showing country with phone number and after implementing lazy-loading my flags were not visible.</p><p>After some digging I found out , CSS of third-party libraries like react-phone-input-2, rc-time-picker etc wasn’t loading when the components were lazy-loaded, because CSS was not getting parsed properly.</p><p>So how do we solve it ?</p><h3>Solution</h3><p>I moved the third party CSS imports to the top level App.tsx, outside the lazy-loaded components.</p><pre>// App.tsx<br>import &#39;react-phone-input-2/lib/style.css&#39;;<br>import &#39;rc-time-picker/assets/index.css&#39;;<br>import &#39;slick-carousel/slick/slick.css&#39;;<br>import &#39;slick-carousel/slick/slick-theme.css&#39;;</pre><p>This small change works like charm , No more FOUC (Flash of Unstyled Content).</p><h3>Learning</h3><p>Lazy loading is great for JS, but external CSS used by those components should still be globally available unless you are using a more advanced CSS extraction setup .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4c7d33fafe2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ReactJS Performance Optimization: Best Practices for Speed and Efficiency]]></title>
            <link>https://medium.com/@shubhamchat224122/reactjs-performance-optimization-best-practices-for-speed-and-efficiency-1b18e76b78b9?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b18e76b78b9</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reactjs-development]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 04:37:28 GMT</pubDate>
            <atom:updated>2025-06-02T04:37:28.731Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Njnb-IN-5DKM2y5PmXXWrg.png" /></figure><h3>Introduction</h3><p>Performance is a key factor in delivering a smooth and responsive user experience in any web application. With ReactJS, developers benefit from a fast and efficient rendering system, thanks to its Virtual DOM. However, as applications scale and become more complex, performance bottlenecks can arise — impacting load times, responsiveness, and ultimately, user satisfaction.</p><p>In this guide, we’ll explore practical ReactJS performance optimization strategies, such as code splitting, lazy loading, debouncing, throttling, memoization, and the use of React hooks like useCallback and useMemo. Each technique is explained through real-world scenarios and code examples, helping you understand not just the “how,” but also the “why” behind each optimization.</p><p>Whether you’re building a small app or managing a large-scale project, these strategies will empower you to write more efficient and performant React code.</p><h3>🔧 1. Code Splitting &amp; Lazy Loading</h3><p><strong>Purpose</strong>: Reduce initial bundle size and improve first-load performance.</p><h3>When to Use:</h3><ul><li>When your app is large and users don’t need all pages/components immediately (e.g., Admin panel).</li><li>Especially helpful in routes, modals, or tabs where not all features are accessed immediately.</li></ul><h3>Key Tools:</h3><ul><li>React.lazy() + Suspense</li><li>Webpack/Rollup code splitting</li></ul><h3>⏱ 2. Debouncing</h3><p><strong>Purpose</strong>: Delay function execution to avoid calling it too frequently.</p><h3>When to Use:</h3><ul><li>Text input fields with autosuggest</li><li>API-triggered input like search bars or live validation</li></ul><h3>Benefit:</h3><p>Reduces CPU cycles and API calls, improving responsiveness and reducing server load.</p><h3>🚦 3. Throttling</h3><p><strong>Purpose</strong>: Restrict a function to run at most once in a specified time interval.</p><h3>When to Use:</h3><ul><li>Scroll/mouse/touch event handlers</li><li>Resize listeners</li><li>Performance-intensive events fired frequently</li></ul><h3>Benefit:</h3><p>Reduces unnecessary function calls to ensure smoother UI and better performance.</p><h3>🧠 4. React.memo</h3><p><strong>Purpose</strong>: Prevent unnecessary re-renders of a component when props haven’t changed.</p><h3>When to Use:</h3><ul><li>Functional components that render frequently with the same props</li><li>Large component trees with pure visual components</li></ul><h3>Caveat:</h3><p>Only prevents re-renders on unchanged <strong>props</strong>, not useState or useContext values unless they too are stable.</p><h3>🧮 5. useCallback</h3><p><strong>Purpose</strong>: Memoize a callback function so it doesn’t get redefined on every render.</p><h3>When to Use:</h3><ul><li>When passing functions as props to memoized child components</li><li>Prevents unnecessary child component re-renders caused by new function references</li></ul><h3>Tip:</h3><p>Use it wisely; unnecessary use of useCallback can increase complexity without benefit.</p><h3>💾 6. useMemo</h3><p><strong>Purpose</strong>: Memoize the result of an expensive computation.</p><h3>When to Use:</h3><ul><li>Heavy computation inside a render</li><li>Deriving values from props/state that don’t need to change often</li></ul><h3>Real-World Examples:</h3><ul><li>Filtering/sorting large data lists</li><li>Calculations based on stable props</li></ul><h3>✅ Final Thoughts</h3><ul><li>These techniques are <strong>powerful tools</strong> — but <strong>only optimize what’s proven to be slow or wasteful</strong>.</li><li>Always <strong>measure before and after</strong> using tools like <strong>React DevTools</strong>, Chrome Performance tab, or <strong>Lighthouse</strong></li><li>For large-scale applications, consider also:</li><li><strong>Virtualization</strong> (e.g., react-window)</li><li><strong>Server-side rendering (SSR)</strong> or <strong>Static Site Generation (SSG)</strong> via Next.js</li><li><strong>Progressive Web Apps (PWA)</strong></li></ul><p>For any queries or further discussions, feel free to leave a comment below or reach out to me on <a href="https://linkedin.com/in/shubhamchat03">LinkedIn</a>! 😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b18e76b78b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixing 404 Errors on Vercel for Multipage React Apps with vercel.json]]></title>
            <link>https://medium.com/@shubhamchat224122/fixing-404-errors-on-vercel-for-multipage-react-apps-with-vercel-json-2c13e8c810ec?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c13e8c810ec</guid>
            <category><![CDATA[vercel]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[router]]></category>
            <category><![CDATA[reactive-programming]]></category>
            <category><![CDATA[vercel-deployment]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Tue, 27 May 2025 02:32:34 GMT</pubDate>
            <atom:updated>2025-05-27T02:32:34.083Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XiZDfTnmGSf1-G2JFVSdDA.png" /></figure><p>If you’ve deployed a <strong>React.js</strong> application on <strong>Vercel</strong> and noticed that navigating directly to routes like /about, /contact, or any route other than / shows a <strong>404: NOT_FOUND</strong> error, you&#39;re not alone. This is a common issue caused by how Vercel handles routing for <strong>Single Page Applications (SPAs)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PMfrygiP76k1ARAyJBHCMw.png" /><figcaption>Error of the day</figcaption></figure><p>If you’ve deployed a <strong>React.js</strong> application on <strong>Vercel</strong> and noticed that navigating directly to routes like /about, /contact, or even <strong>reloading</strong> any route other than the home page (/) throws a <strong>404: NOT_FOUND</strong> error, you&#39;re not alone.</p><p>This is a common issue caused by how Vercel handles routing for <strong>Single Page Applications (SPAs)</strong>.</p><h3>🧩 The Problem</h3><p>When you deploy a SPA like React to Vercel:</p><ul><li>Visiting https://yourdomain.com/ works fine ✅</li><li>Navigating to /about using a React &lt;Link&gt; works fine ✅</li><li>But: Going directly to https://yourdomain.com/about ❌</li><li>Or reloading the /about page ❌<br> Both result in a <strong>404 error</strong></li></ul><p>Why? Because Vercel, by default, tries to match the URL path to a file in the deployed output. Since /about is not a real file (it’s a <strong>client-side route</strong>), it doesn’t exist in the static output, and thus Vercel shows a 404.</p><h3>✅ The Solution: Add vercel.json</h3><p>To fix this, we need to configure Vercel to serve index.html for all non-static routes, so that React Router can handle them on the client side.</p><p>Here’s a vercel.json that works:</p><pre>{<br>  &quot;routes&quot;: [<br>    {<br>      &quot;src&quot;: &quot;/static/(.*)&quot;,           <br>      &quot;dest&quot;: &quot;/static/$1&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/assets/(.*)&quot;,           <br>      &quot;dest&quot;: &quot;/assets/$1&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/(.*\\.js)&quot;,<br>      &quot;dest&quot;: &quot;/$1&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/(.*\\.css)&quot;,<br>      &quot;dest&quot;: &quot;/$1&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/(.*\\.ico)&quot;,<br>      &quot;dest&quot;: &quot;/$1&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/(.*\\.png)&quot;,<br>      &quot;dest&quot;: &quot;/$1&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/editor/(?&lt;roomId&gt;[^/]+)&quot;, //dynamic slug example<br>      &quot;dest&quot;: &quot;/index.html&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/login&quot;,<br>      &quot;dest&quot;: &quot;/index.html&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/register&quot;,<br>      &quot;dest&quot;: &quot;/index.html&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/about&quot;,<br>      &quot;dest&quot;: &quot;/index.html&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/&quot;,<br>      &quot;dest&quot;: &quot;/index.html&quot;<br>    },<br>    {<br>      &quot;src&quot;: &quot;/.*&quot;,<br>      &quot;dest&quot;: &quot;/index.html&quot;<br>    }<br>  ]<br>}</pre><h3>🔍 Explanation</h3><ul><li>Static files like JS, CSS, images, etc., are served correctly using the first few routes.</li><li>The rest of the routes redirect to index.html, ensuring the React Router takes over routing.</li><li>The final catch-all rule &quot;/.*&quot; ensures <strong>any unknown route</strong> is handled by React and not result in a 404.</li></ul><h3>📁 Where to Place It</h3><p>Place the vercel.json file at the <strong>root of your project</strong>, next to your package.json.</p><h3>🚀 Redeploy</h3><p>Once you add this file, redeploy your app on Vercel. You’ll now be able to:</p><ul><li>Navigate to /about, /contact, etc. ✅</li><li>Reload those pages ✅</li><li>Share direct links to inner pages ✅</li></ul><p>No more 404s!</p><h3>💡 Final Thoughts</h3><p>If you’re building a multipage React app and deploying it on Vercel, adding a vercel.json file is <strong>essential</strong>. It ensures your app handles <strong>direct navigation</strong> and <strong>page reloads</strong> properly, acting like a true Single Page Application.</p><p>For any queries or further discussions, feel free to leave a comment below or reach out to me on <a href="https://linkedin.com/in/shubhamchat03">LinkedIn</a>! 😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c13e8c810ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML Best Practices: Structuring for SEO and Clarity]]></title>
            <link>https://medium.com/@shubhamchat224122/html-best-practices-structuring-for-seo-and-clarity-9c3aa046024e?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c3aa046024e</guid>
            <category><![CDATA[html5-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[html-structure]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Mon, 19 May 2025 03:32:32 GMT</pubDate>
            <atom:updated>2025-05-19T03:32:32.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*YodWALmnDcNTY6XUHoIgEg.png" /></figure><p>When building websites, writing clean and semantic HTML isn’t just a matter of aesthetics — it’s essential for SEO, accessibility, and maintainability. In this guide, we’ll walk through key HTML best practices to help you create SEO-friendly and readable web pages.</p><h3>🌟 Why HTML Structure Matters</h3><ul><li><strong>SEO</strong>: Search engines rely on HTML structure to understand your content.</li><li><strong>Accessibility</strong>: Screen readers use semantic tags to help users navigate.</li><li><strong>Maintainability</strong>: Clean structure makes collaboration and updates easier.</li></ul><h3>1️⃣ Use One &lt;h1&gt; Tag Per Page (and Use it Well)</h3><h3>📌 Why It Matters</h3><p>The &lt;h1&gt; tag represents the <strong>main heading</strong> of a page. Search engines often use it to understand the topic of your content.</p><h3>✅ Best Practice</h3><ul><li>Use <strong>only one </strong><strong>&lt;h1&gt;</strong> per page.</li><li>Place it near the top of the &lt;body&gt;.</li><li>Include <strong>target keywords</strong> naturally.</li></ul><h3>💡 Example</h3><pre>&lt;h1&gt;HTML Best Practices for Better SEO&lt;/h1&gt;</pre><p>Avoid:</p><pre>&lt;h1&gt;Introduction&lt;/h1&gt;<br>&lt;h1&gt;SEO Tips&lt;/h1&gt; &lt;!-- ❌ Multiple h1s --&gt;</pre><p>Instead, use a hierarchy:</p><pre>&lt;h1&gt;HTML Best Practices for Better SEO&lt;/h1&gt;<br>&lt;h2&gt;Why HTML Matters&lt;/h2&gt;<br>&lt;h2&gt;Heading Hierarchy&lt;/h2&gt;<br>&lt;h3&gt;Using H3 Under H2&lt;/h3&gt;</pre><h3>2️⃣ Maintain Proper Heading Hierarchy (H2 &gt; H3 &gt; H4…)</h3><h3>📌 Why It Matters</h3><p>Headings create an outline for your content. Proper structure helps both users and search engines understand the flow.</p><h3>✅ Best Practice</h3><ul><li>After &lt;h1&gt;, use &lt;h2&gt; for major sections.</li><li>Use &lt;h3&gt; for subsections under an &lt;h2&gt;, and so on.</li></ul><h3>💡 Example</h3><pre>&lt;h1&gt;Healthy Eating Guide&lt;/h1&gt;<br>&lt;h2&gt;Benefits of a Balanced Diet&lt;/h2&gt;<br>&lt;h3&gt;Improves Energy Levels&lt;/h3&gt;<br>&lt;h3&gt;Supports Mental Health&lt;/h3&gt;<br>&lt;h2&gt;Top 5 Healthy Foods&lt;/h2&gt;</pre><h3>3️⃣ Always Include alt Text on Images</h3><h3>📌 Why It Matters</h3><ul><li>Enhances <strong>accessibility</strong> for screen readers.</li><li>Improves <strong>SEO</strong> by describing image content.</li></ul><h3>✅ Best Practice</h3><ul><li>Be <strong>descriptive but concise</strong>.</li><li>Avoid using “image of…” or “photo of…” — it’s implied.</li></ul><h3>💡 Example</h3><pre>&lt;img src=&quot;fresh-fruits.jpg&quot; alt=&quot;A basket of fresh fruits including apples and bananas&quot;&gt;</pre><p>Avoid:</p><pre>&lt;img src=&quot;fresh-fruits.jpg&quot;&gt; &lt;!-- ❌ No alt text --&gt;</pre><h3>4️⃣ Avoid Inline CSS , Use External or Internal Styles</h3><h3>📌 Why It Matters</h3><ul><li>Inline styles make HTML cluttered.</li><li>Difficult to maintain or reuse styles.</li><li>Breaks separation of concerns (content vs. style).</li></ul><h3>❌ Bad (Inline CSS)</h3><pre>&lt;p style=&quot;color: blue; font-size: 16px;&quot;&gt;This is a paragraph.&lt;/p&gt;</pre><h3>✅ Good (External/Internal CSS)</h3><pre>&lt;!-- HTML --&gt;<br>&lt;p class=&quot;highlight-text&quot;&gt;This is a paragraph.&lt;/p&gt;</pre><pre>&lt;!-- CSS --&gt;<br>&lt;style&gt;<br>  .highlight-text {<br>    color: blue;<br>    font-size: 16px;<br>  }<br>&lt;/style&gt;</pre><p>Or, better: use a separate .css file.</p><h3>5️⃣ Use Schema Markup for Rich Snippets</h3><h3>📌 Why It Matters</h3><p>Schema.org markup helps search engines understand your content better, enabling <strong>rich results</strong> like ratings, FAQs, and breadcrumbs in Google search.</p><h3>✅ Best Practice</h3><p>Use JSON-LD inside &lt;script type=&quot;application/ld+json&quot;&gt;.</p><h3>💡 Example: Blog Post Schema</h3><pre>&lt;script type=&quot;application/ld+json&quot;&gt;<br>{<br>  &quot;@context&quot;: &quot;https://schema.org&quot;,<br>  &quot;@type&quot;: &quot;BlogPosting&quot;,<br>  &quot;headline&quot;: &quot;HTML Best Practices for Better SEO&quot;,<br>  &quot;author&quot;: {<br>    &quot;@type&quot;: &quot;Person&quot;,<br>    &quot;name&quot;: &quot;Jane Doe&quot;<br>  },<br>  &quot;datePublished&quot;: &quot;2025-05-12&quot;,<br>  &quot;publisher&quot;: {<br>    &quot;@type&quot;: &quot;Organization&quot;,<br>    &quot;name&quot;: &quot;YourSite&quot;,<br>    &quot;logo&quot;: {<br>      &quot;@type&quot;: &quot;ImageObject&quot;,<br>      &quot;url&quot;: &quot;https://yoursite.com/logo.png&quot;<br>    }<br>  }<br>}<br>&lt;/script&gt;</pre><p>📘 <a href="https://schema.org/">Learn more at schema.org</a></p><h3>Bonus Tips</h3><h3>✅ Semantic Tags for Layout</h3><p>Use tags like:</p><pre>&lt;header&gt;, &lt;nav&gt;, &lt;main&gt;, &lt;section&gt;, &lt;article&gt;, &lt;footer&gt;</pre><p>These add clarity and boost accessibility and SEO.</p><h3>✅ Meta Tags for SEO</h3><p>Include relevant &lt;meta&gt; tags in &lt;head&gt;:</p><pre>&lt;meta name=&quot;description&quot; content=&quot;Learn HTML best practices to improve SEO and code clarity.&quot;&gt;</pre><p>Semantic HTML lays the foundation for accessible sites. I previously wrote about <a href="https://medium.com/@shubhamchat224122/html5-semantic-elements-aria-building-accessible-web-pages-47ae6d7ad57e">Accessible and SEO-Optimized Web Pages Using Semantic HTML &amp; ARIA</a>.</p><h3>🏁 Summary</h3><p>Best Practice Why It Matters One &lt;h1&gt; per page Helps search engines understand the topic Use H2/H3 hierarchy Creates content structure Use descriptive alt tags Boosts accessibility and SEO No inline CSS Keeps HTML clean and reusable Schema markup Enables rich search snippets</p><h3><strong>Related Reading:</strong></h3><ul><li><a href="https://medium.com/@shubhamchat224122/html5-semantic-elements-aria-building-accessible-web-pages-47ae6d7ad57e">Understanding Web Accessibility</a></li><li><a href="https://medium.com/@shubhamchat224122/html5-semantic-elements-aria-building-accessible-web-pages-47ae6d7ad57e">How to Use Meta Tags for SEO</a></li></ul><h3>✅ Final Thoughts</h3><p>Clean HTML is the foundation of a great website. By following these best practices, you make your pages more <strong>searchable</strong>, <strong>accessible</strong>, and <strong>maintainable</strong>. Whether you’re a beginner or refining your skills, these tips will help you structure HTML with confidence and clarity.</p><p>For any queries or further discussions, feel free to leave a comment below or reach out to me on <a href="https://linkedin.com/in/shubhamchat03">LinkedIn</a>! 😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c3aa046024e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML5 Semantic Elements & ARIA : Building Accessible Web Pages]]></title>
            <link>https://medium.com/@shubhamchat224122/html5-semantic-elements-aria-building-accessible-web-pages-47ae6d7ad57e?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/47ae6d7ad57e</guid>
            <category><![CDATA[aria]]></category>
            <category><![CDATA[seo-tips]]></category>
            <category><![CDATA[seo]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[accessibility]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Mon, 12 May 2025 03:32:28 GMT</pubDate>
            <atom:updated>2025-05-12T03:32:28.790Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L5rVKZj38bYIhR44ucAQ0Q.png" /><figcaption>HTML5 Semantic</figcaption></figure><h3>Accessible and SEO-Optimized Web Pages Using Semantic HTML &amp; ARIA</h3><p>Web accessibility ensures that websites are usable by everyone, including individuals with disabilities. A key part of accessibility is using <strong>semantic HTML elements</strong> — HTML tags that convey the meaning of their content. In this blog, we’ll explore semantic elements, ARIA roles, and how to build an accessible web page using these techniques.</p><h3>What Are Semantic HTML Elements?</h3><p>Semantic HTML elements clearly describe their meaning to both the browser and the developer. Examples include:</p><ul><li>&lt;header&gt;: Introductory content or navigation links.</li><li>&lt;nav&gt;: A section of navigation links.</li><li>&lt;main&gt;: The central content of the page.</li><li>&lt;section&gt;: A thematic grouping of content, typically with a heading.</li><li>&lt;article&gt;: A self-contained composition like a blog post or news article.</li><li>&lt;aside&gt;: Content tangentially related to the main content (like a sidebar).</li><li>&lt;footer&gt;: Information about the document or a section.</li></ul><p>These tags provide better context for assistive technologies like screen readers and help with SEO and maintainability.</p><h3>Why Semantic HTML Matters for Accessibility</h3><p>Screen readers use HTML tags to interpret a webpage. For example:</p><ul><li>&lt;nav&gt; helps screen readers announce “navigation region.”</li><li>&lt;main&gt; indicates the primary content of the page.</li><li>&lt;header&gt; and &lt;footer&gt; help organize content into logical sections.</li></ul><p>Using the right tags <strong>reduces the need</strong> for extra ARIA roles and improves the experience for keyboard and screen reader users.</p><h3>What Are ARIA Roles?</h3><p>ARIA (Accessible Rich Internet Applications) roles are attributes added to HTML to enhance accessibility, especially for dynamic content.</p><p>For example:</p><pre>&lt;div role=&quot;navigation&quot;&gt;<br>  &lt;!-- navigation content --&gt;<br>&lt;/div&gt;</pre><p>However, you should prefer semantic HTML tags over ARIA roles whenever possible. ARIA is most useful when no semantic alternative exists.</p><blockquote><em>💡 Tip: Use semantic elements first. Add ARIA roles only when necessary.</em></blockquote><h3>✅ When to Definitely Use ARIA</h3><p>Use ARIA roles when you’re creating <strong>custom UI components</strong> that don’t have a native semantic HTML equivalent — like tabs, modals, sliders, etc.</p><h3>Example: ARIA in a Custom Modal</h3><pre>&lt;!-- Page Content Wrapper --&gt;<br>&lt;div id=&quot;pageContent&quot; aria-hidden=&quot;false&quot;&gt;<br>  &lt;!-- Trigger Button --&gt;<br>  &lt;button aria-haspopup=&quot;dialog&quot; aria-controls=&quot;myModal&quot; onclick=&quot;openModal()&quot;&gt;<br>    Open Modal<br>  &lt;/button&gt;<br>&lt;/div&gt;<br><br>&lt;!-- Modal --&gt;<br>&lt;div id=&quot;myModal&quot; role=&quot;dialog&quot; aria-modal=&quot;true&quot; aria-labelledby=&quot;modalTitle&quot; aria-describedby=&quot;modalDesc&quot; style=&quot;display: none;&quot;&gt;<br>  &lt;div&gt;<br>    &lt;h2 id=&quot;modalTitle&quot;&gt;Subscribe to Newsletter&lt;/h2&gt;<br>    &lt;p id=&quot;modalDesc&quot;&gt;Please enter your email to subscribe to our updates.&lt;/p&gt;<br>    &lt;input type=&quot;email&quot; placeholder=&quot;Email&quot; /&gt;<br>    &lt;button&gt;Submit&lt;/button&gt;<br>    &lt;button onclick=&quot;closeModal()&quot;&gt;Close&lt;/button&gt;<br>  &lt;/div&gt;<br>&lt;/div&gt;<br><br>&lt;!-- Script --&gt;<br>&lt;script&gt;<br>  function openModal() {<br>    document.getElementById(&#39;myModal&#39;).style.display = &#39;block&#39;;<br>    document.getElementById(&#39;pageContent&#39;).setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);<br>  }<br><br>  function closeModal() {<br>    document.getElementById(&#39;myModal&#39;).style.display = &#39;none&#39;;<br>    document.getElementById(&#39;pageContent&#39;).removeAttribute(&#39;aria-hidden&#39;);<br>  }<br>&lt;/script&gt;</pre><pre>//create a style.css file <br>#myModal {<br>  position: fixed;<br>  top: 0;<br>  left: 0;<br>  width: 100%;<br>  height: 100%;<br>  background-color: rgba(0, 0, 0, 0.6);<br>  z-index: 1000;<br>  display: none;<br>}<br><br>#myModal &gt; div {<br>  background: #fff;<br>  margin: 10% auto;<br>  padding: 2rem;<br>  width: 90%;<br>  max-width: 500px;<br>  border-radius: 8px;<br>}</pre><h3>💡 Why it matters:</h3><ul><li>role=&quot;dialog&quot; signals screen readers that this is a modal dialog.</li><li>aria-modal=&quot;true&quot; prevents background content from being read.</li><li>aria-labelledby and aria-describedby provide context.</li></ul><h3>❌Common Mistakes in Accessible Web Development</h3><ul><li><strong>Using too many </strong><strong>&lt;div&gt;s</strong> instead of semantic elements like &lt;nav&gt;, &lt;section&gt;, &lt;header&gt;.</li><li><strong>Forgetting </strong><strong>alt text</strong> on images. Always describe the image unless it’s purely decorative (alt=&quot;&quot;).</li><li><strong>Misusing ARIA</strong>: Don’t use ARIA if a native HTML element already provides the same functionality.</li><li><strong>Not testing with keyboard/screen reader</strong>: Relying only on visual feedback leads to gaps in accessibility.</li></ul><h3>⌨️ Keyboard Navigation Tips</h3><ol><li><strong>Use </strong><strong>tabindex=&quot;0&quot;</strong> to make non-interactive elements focusable (e.g., a div that acts like a button).</li><li><strong>Avoid </strong><strong>tabindex=&quot;-1&quot;</strong> unless you&#39;re programmatically focusing the element (like a modal).</li><li><strong>Add skip links</strong> to let users jump to content:</li></ol><h3>Example: Skip Link</h3><pre>&lt;a href=&quot;#mainContent&quot; class=&quot;skip-link&quot;&gt;Skip to main content&lt;/a&gt;<br>&lt;main id=&quot;mainContent&quot;&gt;<br>  &lt;!-- Main content goes here --&gt;<br>&lt;/main&gt;</pre><h3>CSS for skip link:</h3><pre>.skip-link {<br>  position: absolute;<br>  top: -40px;<br>  left: 0;<br>  background: #000;<br>  color: #fff;<br>  padding: 8px;<br>  z-index: 100;<br>}<br>.skip-link:focus {<br>  top: 0;<br>}</pre><h3>Meta Tags for SEO and Accessibility</h3><p>&lt;meta&gt; tags go inside the &lt;head&gt; section and help search engines and browsers understand your page content. They don’t appear visually on the page but are essential for SEO, accessibility, and sharing.</p><h3>Common Meta Tags</h3><pre>&lt;head&gt;<br>  &lt;meta charset=&quot;UTF-8&quot; /&gt;<br>  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt;<br>  &lt;meta name=&quot;description&quot; content=&quot;Learn how to build accessible web pages using semantic HTML and ARIA roles.&quot; /&gt;<br>  &lt;meta name=&quot;keywords&quot; content=&quot;HTML5, semantic HTML, accessibility, ARIA, SEO&quot; /&gt;<br>  &lt;meta name=&quot;author&quot; content=&quot;Your Name&quot; /&gt;<br>  &lt;title&gt;Accessible Web Pages with Semantic HTML&lt;/title&gt;<br>&lt;/head&gt;</pre><h3>Open Graph and Twitter Card Tags</h3><p>These tags ensure your blog displays rich preview cards when shared, improving click-through and brand consistency.</p><pre>&lt;meta property=&quot;og:title&quot; content=&quot;Accessible Web Pages with Semantic HTML&quot;&gt;<br>&lt;meta property=&quot;og:description&quot; content=&quot;Build accessible and SEO-friendly web pages using semantic HTML, ARIA roles, and meta tags.&quot;&gt;<br>&lt;meta property=&quot;og:image&quot; content=&quot;https://example.com/preview.png&quot;&gt;<br>&lt;meta property=&quot;og:url&quot; content=&quot;https://example.com/blog/semantic-html&quot;&gt;<br>&lt;meta name=&quot;twitter:card&quot; content=&quot;summary_large_image&quot;&gt;<br>&lt;meta name=&quot;twitter:creator&quot; content=&quot;@yourhandle&quot;&gt;</pre><blockquote><em>These improve how your links look when shared on platforms like Twitter, Facebook, or LinkedIn.</em></blockquote><h3>Building a Simple Accessible Webpage</h3><p>Let’s walk through creating a basic, accessible blog using semantic HTML.</p><h3>Step 1: Set Up the HTML Structure</h3><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>  &lt;meta charset=&quot;UTF-8&quot;&gt;<br>  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>  &lt;meta name=&quot;description&quot; content=&quot;A blog about building accessible web pages using HTML5 semantic elements and ARIA roles.&quot;&gt;<br>  &lt;title&gt;Accessible Blog&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><h3>Step 2: Add Semantic Elements</h3><pre>&lt;body&gt;<br>  &lt;header&gt;<br>    &lt;h1&gt;My Accessible Blog&lt;/h1&gt;<br>    &lt;nav&gt;<br>      &lt;ul&gt;<br>        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br>        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;<br>      &lt;/ul&gt;<br>    &lt;/nav&gt;<br>  &lt;/header&gt;<br>  &lt;main&gt;<br>    &lt;article&gt;<br>      &lt;h2&gt;Understanding Semantic HTML&lt;/h2&gt;<br>      &lt;p&gt;Semantic HTML is the foundation of accessible web development...&lt;/p&gt;<br>    &lt;/article&gt;<br>    &lt;aside&gt;<br>      &lt;h3&gt;Related Articles&lt;/h3&gt;<br>      &lt;ul&gt;<br>        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;HTML5 Tags You Should Know&lt;/a&gt;&lt;/li&gt;<br>        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Using ARIA Roles Wisely&lt;/a&gt;&lt;/li&gt;<br>      &lt;/ul&gt;<br>    &lt;/aside&gt;<br>  &lt;/main&gt;<br>  &lt;footer&gt;<br>    &lt;p&gt;&amp;copy; 2025 My Accessible Blog&lt;/p&gt;<br>  &lt;/footer&gt;<br>&lt;/body&gt;</pre><h3>Step 3: Add Basic Styling</h3><pre>/* styles.css */<br>body {<br>  font-family: Arial, sans-serif;<br>  line-height: 1.6;<br>  padding: 1rem;<br>}<br>header, footer {<br>  background-color: #f4f4f4;<br>  padding: 1rem;<br>}<br>nav ul {<br>  display: flex;<br>  list-style-type: none;<br>  gap: 1rem;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G5DR-TQrzIHtI4G4Uze4sQ.png" /><figcaption>Blog home page</figcaption></figure><h3>Step 4: Test for Accessibility</h3><p>Use tools like:</p><ul><li><a href="https://chromewebstore.google.com/detail/lighthouse/blipmdconlkpinefehnmjammfjpmpbjk"><strong>Lighthouse</strong></a> in Chrome DevTools</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QJaufZlOymLbV8xYipen0Q.png" /><figcaption>Lighthouse result after using all the Meta tags and Best Practices</figcaption></figure><ul><li><a href="https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd"><strong>axe DevTools</strong></a><strong> Extension</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zwVsFYHs2PwSLHDq2HCRRg.png" /><figcaption>axe DevTools Extension result</figcaption></figure><ul><li><a href="https://chromewebstore.google.com/detail/seo-meta-in-1-click/bjogjfinolnhfhkbipphpdlldadpnmhc"><strong>SEO Meta in 1 Click</strong></a> meta tags check</li><li><strong>VoiceOver</strong> or <strong>NVDA</strong> screen readers</li></ul><p>These can help ensure elements are keyboard-accessible and semantically structured.</p><h3>Best Practices for Semantic HTML and Accessibility</h3><ul><li>✅ Use HTML5 elements like `&lt;main&gt;`, `&lt;nav&gt;`, `&lt;article&gt;`, and `&lt;section&gt;` instead of generic `&lt;div&gt;`s</li><li>✅ Label landmarks clearly with headings inside `&lt;section&gt;` or `&lt;article&gt;`</li><li>✅ Avoid redundant ARIA roles</li><li>✅ Always add `alt` attributes to images</li></ul><pre>&lt;img src=&quot;profile.jpg&quot; alt=&quot;Headshot of Jane Doe, Web Developer&quot;&gt;</pre><h3>Bonus: Semantic Tags You Should Know</h3><p>Here are a few more semantic tags you might have missed:</p><p>&lt;main&gt; Wraps the primary content of the page (one per document)</p><p>&lt;aside&gt; Contains related or sidebar content</p><p>&lt;figure&gt; + &lt;figcaption&gt; Used for images with optional captions</p><p>&lt;time&gt; Marks dates or times in machine-readable format</p><p>&lt;mark&gt; Highlights relevant text</p><p>&lt;summary&gt; + &lt;details&gt; Create collapsible content sections</p><h3>1. &lt;main&gt; — Primary page content</h3><pre>&lt;main&gt;<br>  &lt;h1&gt;Welcome to My Blog&lt;/h1&gt;<br>  &lt;p&gt;This is the main content of the page. It’s unique to this page.&lt;/p&gt;<br>&lt;/main&gt;</pre><h3>2. &lt;aside&gt; — Sidebar or tangential content</h3><pre>&lt;aside&gt;<br>  &lt;h2&gt;Related Posts&lt;/h2&gt;<br>  &lt;ul&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;What is Semantic HTML?&lt;/a&gt;&lt;/li&gt;<br>    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;How to Use ARIA Roles&lt;/a&gt;&lt;/li&gt;<br>  &lt;/ul&gt;<br>&lt;/aside&gt;</pre><h3>3. &lt;figure&gt; and &lt;figcaption&gt; — Image with caption</h3><pre>&lt;figure&gt;<br>  &lt;img src=&quot;sunset.jpg&quot; alt=&quot;Sunset over the mountains&quot;&gt;<br>  &lt;figcaption&gt;A beautiful sunset captured during our hike.&lt;/figcaption&gt;<br>&lt;/figure&gt;</pre><h3>4. &lt;time&gt; — Machine-readable date/time</h3><pre>&lt;p&gt;Published on &lt;time datetime=&quot;2025-05-11&quot;&gt;May 11, 2025&lt;/time&gt;&lt;/p&gt;</pre><h3>5. &lt;mark&gt; — Highlighted or marked text</h3><pre>&lt;p&gt;The keyword to focus on is &lt;mark&gt;accessibility&lt;/mark&gt;.&lt;/p&gt;</pre><h3>6. &lt;details&gt; and &lt;summary&gt; — Collapsible content</h3><pre>&lt;details&gt;<br>  &lt;summary&gt;What is Semantic HTML?&lt;/summary&gt;<br>  &lt;p&gt;Semantic HTML refers to using HTML tags that convey meaning about the type of content within them.&lt;/p&gt;<br>&lt;/details&gt;</pre><p>These examples are ready to be dropped into a web page, and they enhance accessibility and structure. Would you like these styled with CSS for better presentation in a blog?</p><h3>Conclusion</h3><blockquote><em>✅ Semantic HTML isn’t just about cleaner code — it empowers assistive technologies, improves SEO, and ensures your content is accessible to all. By using semantic tags and testing your site’s accessibility, you’re building a web that works for everyone.</em></blockquote><h3>Resources for Further Learning</h3><ul><li><a href="https://developer.mozilla.org/en-US/docs/Glossary/Semantics">MDN Web Docs: HTML5 Semantic Elements</a></li><li><a href="https://www.w3.org/WAI/ARIA/apg/">WAI-ARIA Authoring Practices Guide</a></li><li><a href="https://webaim.org/techniques/aria/">WebAIM: Introduction to ARIA</a></li><li><a href="https://www.deque.com/axe/devtools/">Axe Accessibility Checker</a></li></ul><p>For any queries or further discussions, feel free to leave a comment below or reach out to me on <a href="https://linkedin.com/in/shubhamchat03">LinkedIn</a>! 😀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47ae6d7ad57e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Speeding Up Your Backend with Database Indexing]]></title>
            <link>https://medium.com/@shubhamchat224122/speeding-up-your-backend-with-database-indexing-a131f3345261?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a131f3345261</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[database-management]]></category>
            <category><![CDATA[database-indexing]]></category>
            <category><![CDATA[database-design]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Sat, 10 May 2025 14:31:41 GMT</pubDate>
            <atom:updated>2025-05-10T14:31:41.899Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*enR5QovKYEOp2UYXD4cPFg.png" /><figcaption>Speeding up Your Backend with Database Indexing</figcaption></figure><p>As a software engineer, you’ve probably hit that moment where your app starts to feel sluggish. Maybe your users are waiting too long for search results, or a report that used to load instantly now takes forever. If you’re working with a database — whether it’s MySQL, PostgreSQL, or MongoDB — one of the easiest ways to boost performance is by using <strong>indexes</strong>. Let’s break down what database indexing is, why it matters, and how to get started.</p><h3>What’s an Index, Anyway?</h3><p>Think of a database index like the index in a book. Without it, you’d have to scan every page to find a topic. With an index, you flip straight to the right page. In a database, an index is a data structure that helps the database engine find rows faster, especially for queries with `<strong>WHERE</strong>`, `<strong>JOIN</strong>`, or `<strong>ORDER BY</strong>` clauses.</p><p>For example, if you have a `users` table with a million rows and you frequently query by `email`, an index on the `email` column can make those lookups lightning-fast.</p><p>A Real-World Example<br>Let’s say you’re building a backend for an e-commerce app with a `products` table:</p><pre>CREATE TABLE products (<br> id SERIAL PRIMARY KEY,<br> name VARCHAR(255),<br> category VARCHAR(100),<br> price DECIMAL(10, 2)<br>);</pre><p>Your app lets users filter products by `<strong>category</strong>`, like “electronics” or “clothing.” A query like this might run often:</p><pre>SELECT * FROM products WHERE category = &#39;electronics&#39;;</pre><p>Without an index, the database scans every row in the `products` table to find matches — a process called a <strong>full table scan</strong>. If you have thousands of products, this gets slow. Let’s add an index:</p><pre>CREATE INDEX idx_category ON products(category);</pre><p>Now, the database uses the `<strong>idx_category</strong>` index to quickly locate rows where `category = ‘electronics’`, skipping the full scan. The result? Queries that might’ve taken seconds now finish in milliseconds.</p><h3>When to Use Indexes</h3><p>Indexes are great, but they’re not free. Here’s a quick guide:<br>- <strong>Use indexes:</strong> on columns you frequently filter, join, or sort on (e.g., `<strong>WHERE</strong>`, `<strong>JOIN</strong>`, `<strong>ORDER BY</strong>`).<br>- <strong>Avoid over-indexing</strong>: Every index takes up storage and slows down `<strong>INSERT</strong>`, `<strong>UPDATE</strong>`, and `<strong>DELETE</strong>` operations because the index needs to be updated too.<br>- <strong>Check your queries:</strong> Tools like PostgreSQL’s `EXPLAIN` or MySQL’s `<strong>EXPLAIN ANALYZE</strong>` show whether your queries are using indexes effectively.</p><h3>A Quick Tip for AWS Users</h3><p>If you’re hosting your database on AWS RDS, keep an eye on your database’s performance metrics in CloudWatch. If you notice high read latencies, it might be time to audit your indexes. Also, RDS makes it easy to add indexes without downtime, but test changes in a staging environment first — adding an index on a large table can take a while.</p><h3>Why I Love Indexing</h3><p>As someone who’s debugged slow APIs at 2 a.m., I can’t overstate how much indexing has saved me. It’s one of those “<strong><em>set it and forget it</em></strong>” optimizations that can make a huge difference with minimal effort. Plus, it’s a great way to learn how databases work under the hood.</p><p>Next time your app feels sluggish, check your database queries and consider adding an index. It’s like giving your backend a shot of espresso! Got a favorite database optimization trick? Drop it in the comments — I’d love to hear what’s worked for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a131f3345261" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Quick Dive into Git Stash: Your Secret Weapon for Cleaner Workflows]]></title>
            <link>https://medium.com/@shubhamchat224122/a-quick-dive-into-git-stash-your-secret-weapon-for-cleaner-workflows-4d1e6252f1db?source=rss-2a139ad94bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d1e6252f1db</guid>
            <category><![CDATA[git-stash]]></category>
            <category><![CDATA[git-version-control]]></category>
            <category><![CDATA[git-stash-pop]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Shubham Chaturvedi]]></dc:creator>
            <pubDate>Sun, 04 May 2025 16:50:52 GMT</pubDate>
            <atom:updated>2025-05-04T16:50:52.883Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q4cdSrRLQchKGaESZsEpQA.png" /><figcaption>git stash</figcaption></figure><p>As developers, we’ve all been there — working on a feature, only to be interrupted by a sudden bug fix or an urgent task. You don’t want to commit half-baked code, but you also need to switch gears fast. Enter Git Stash, a simple yet powerful tool that can save your workflow and keep your repository clean.</p><h3>What is Git Stash?</h3><p>Git Stash lets you temporarily save your uncommitted changes (both staged and unstaged) without creating a commit. It’s like putting your work on a shelf, allowing you to switch branches or tackle another task, then come back to your changes later.</p><h3>Why Use Git Stash?</h3><ul><li><strong>Context Switching</strong>: Need to fix a bug on another branch? Stash your current changes, switch branches, and return to your work later.</li><li><strong>Clean Commits</strong>: Avoid messy “WIP” commits that clutter your history.</li><li><strong>Experiment Safely</strong>: Try something new without worrying about losing your current progress.</li></ul><h3>How to Use Git Stash</h3><p>Here’s a quick rundown of the most common commands:</p><ol><li><strong>Stash Your Changes</strong>:</li></ol><pre>git stash</pre><p>This saves your changes and reverts your working directory to the last commit. You can now switch branches or work on something else.</p><p><strong>2. View Your Stashes</strong>:</p><pre>git stash list</pre><p>This shows all your stashed changes, with the most recent at the top (stash@{0}).</p><p><strong>3. Apply a Stash</strong>:</p><pre>git stash apply</pre><p>This brings back your most recent stash without removing it from the stash list. To apply a specific stash, use git stash apply stash@{n}.</p><p><strong>4. Delete a Stash</strong>:</p><pre>git stash drop stash@{n}</pre><p>Once you’re done with a stash, you can remove it. Or, use git stash pop to apply and delete a stash in one step.</p><p><strong>5. Stash with a Message</strong>:</p><pre>git stash push -m &quot;Working on new feature&quot;</pre><p>Adding a message makes it easier to identify your stashes later.</p><h3>Pro Tip: Stashing Untracked Files</h3><p>By default, Git Stash only saves tracked files. To include untracked files (e.g., new files not yet added), use:</p><pre>git stash --include-untracked</pre><h3>When to Avoid Git Stash</h3><p>While Git Stash is handy, it’s not a replacement for proper branching. For long-term work or collaborative projects, create a dedicated branch instead. Stashes are best for short-term, individual interruptions.</p><h3>Wrapping Up</h3><p>Git Stash is a lightweight tool that can make your development workflow smoother and more flexible. Next time you’re juggling tasks or need to pause your work, give it a try. It’s a small command with a big impact.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d1e6252f1db" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>