# JavaScript के बिना पढ़ने योग्य HTML — AI Visibility और LLM Brand Discovery

Source: https://www.geekswithgeeks.com/hi/ai-visibility/tech-renderable-html

> पक्का करें कि मुख्य सामग्री raw HTML में हो, सिर्फ़ scripts चलने के बाद नहीं।

## साधारण crawler क्या देखता है

कई AI crawlers पन्ने का HTML लाते हैं और **JavaScript नहीं चलाते**। आपकी क़ीमत, उत्पाद ब्योरे या लेख client-side scripts से भरे जाते हों तो वे crawlers ख़ाली ढाँचा देख सकते हैं। महत्वपूर्ण सामग्री के लिए **server-side rendering** या **static generation** चुनें, हर पन्ने को अनोखा URL, स्पष्ट `<title>`, शीर्षक और वर्णनात्मक text दें, और मुख्य तथ्य सिर्फ़ images या केवल interactive widgets में न छिपाएँ। त्वरित जाँच: पन्ने का source देखें, या `curl` से लाएँ, और जाँचें कि मुख्य text वहाँ है।

## Raw HTML बनाम script से भरा text, चलाकर

मैंने यह चलाया। Scripts अनदेखा करने वाला text extractor शीर्षक और अनुच्छेद देखता है पर वह क़ीमत वाली पंक्ति नहीं जिसे JavaScript बाद में जोड़ता है, इसलिए `Pricing` नहीं मिलता।

```python
from html.parser import HTMLParser

html_raw = ("<html><body><h1>Acme Tasks</h1><p>Simple boards for small teams.</p>"
            "<div id='app'></div><script>document.getElementById('app')"
            ".innerHTML='<p>Pricing from 5 USD</p>'</script></body></html>")

class Txt(HTMLParser):
    def __init__(s):
        super().__init__(); s.t = []; s.skip = False
    def handle_starttag(s, tag, a): s.skip = tag in ("script", "style")
    def handle_endtag(s, tag): s.skip = False
    def handle_data(s, d):
        if not s.skip and d.strip(): s.t.append(d.strip())

p = Txt(); p.feed(html_raw)
print(p.t, "Pricing" in " ".join(p.t))
```

Output:

```
['Acme Tasks', 'Simple boards for small teams.'] False
```

## curl से जाँचें

`curl -s https://your-site/pricing | grep -i "5 USD"` चलाएँ। Response में संख्या न मिले तो कई crawlers भी उसे चूकेंगे, चाहे browser में पन्ना कितना भी अच्छा दिखे।

**Quiz:** सिर्फ़ client-side rendering AI visibility को कैसे नुक़सान पहुँचा सकता है?

- [ ] यह साइट को बहुत सटीक बना देता है
- [ ] Browsers में JavaScript प्रतिबंधित है
- [x] JavaScript न चलाने वाले crawlers ख़ाली पन्ना देख सकते हैं
- [ ] यह आपकी robots.txt हटा देता है

*Answer:* JavaScript न चलाने वाले crawlers ख़ाली पन्ना देख सकते हैं. जो सामग्री scripts चलने के बाद ही दिखती है वह crawler तक कभी नहीं पहुँच सकती।
