इन चरणों को काम की checklist की तरह इस्तेमाल करें और इन्हें परियोजना के साक्ष्य, दायरे और सीमाओं के अनुसार ढालें।
व्यावहारिक चरण
- जिस page की जाँच करनी है, उसे और browser developer console खोलें। Mobile overflow checker के लिए पहले responsive mode इस्तेमाल करें।
- Code की समीक्षा करें, पूरा snippet console में paste करें और Enter दबाएँ। यह मौजूदा page पढ़ता है; केवल sitemap metadata tool और same-origin checkers सीमित requests भेजते हैं।
- Console output या डाउनलोड की गई CSV/JSON देखें। Browser policies, authentication और unsupported server methods के कारण कुछ जाँचें निर्णायक नतीजा नहीं दे सकतीं।
(() => {
const MAX_LINKS = 5000;
const allLinks = document.links;
const links = Array.from({ length: Math.min(allLinks.length, MAX_LINKS) }, (_, index) => allLinks[index]).map((link) => {
const url = new URL(link.href, location.href);
const text = [link.innerText, link.getAttribute('aria-label'), link.title]
.map((value) => (value || '').trim().replace(/\s+/g, ' '))
.find(Boolean) || '';
return {
text,
url: url.href,
type: url.origin === location.origin ? 'internal' : 'external',
target: link.target || '',
rel: link.rel || '',
nofollow: link.relList.contains('nofollow'),
ariaLabel: link.getAttribute('aria-label') || '',
};
});
console.table(links);
const quote = (value) => '"' + String(value).replace(/[\u0000-\u0020]*[=+\-@]/, (match) => "'" + match).replace(/"/g, '""') + '"';
const columns = ['text', 'url', 'type', 'target', 'rel', 'nofollow', 'ariaLabel'];
const csv = '\uFEFF' + [columns, ...links.map((row) => columns.map((column) => row[column] ?? ''))].map((row) => row.map(quote).join(',')).join('\r\n');
const a = document.createElement('a'); a.href = URL.createObjectURL(new Blob([csv], { type: 'text/csv;charset=utf-8' })); a.download = 'page-links.csv'; a.click(); setTimeout(() => URL.revokeObjectURL(a.href), 1000);
console.info('Exported ' + links.length + ' links from the current page.');
if (allLinks.length > MAX_LINKS) console.warn('Only the first ' + MAX_LINKS + ' of ' + allLinks.length + ' links were exported.');
})();चलाने से पहले review करें। यह मौजूदा page पढ़ती है; केवल sitemap और link audits सीमित same-origin requests भेजते हैं। Requests में cookies शामिल नहीं होते; script site content नहीं बदलती।