Skip to content

Commit 43446ff

Browse files
committed
fix manifest and seo
1 parent 2354007 commit 43446ff

3 files changed

Lines changed: 91 additions & 187 deletions

File tree

docs/demo/index.html

Lines changed: 69 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,65 @@
1313

1414
<meta charset="UTF-8">
1515
<meta name="viewport" content="width=device-width, initial-scale=1.0">
16-
<title>CacheCat Demo Site</title>
16+
17+
<!-- Primary Meta Tags -->
18+
<title>CacheCat Demo Site - Test Website Storage Management</title>
19+
<meta name="title" content="CacheCat Demo Site - Test Website Storage Management">
20+
<meta name="description" content="Test CacheCat Chrome Extension with sample data. Create Cookies, Local Storage, Session Storage, IndexedDB, and Cache Storage entries to test the extension.">
21+
<meta name="keywords" content="cachecat demo, storage testing, cookies test, local storage test, indexeddb test, cache storage test, chrome extension demo, storage manager demo">
22+
<meta name="author" content="chinmay29hub">
23+
<meta name="robots" content="index, follow">
24+
<meta name="language" content="English">
25+
<meta name="revisit-after" content="7 days">
26+
<link rel="canonical" href="https://cachecat.vercel.app/demo/">
27+
28+
<!-- Open Graph / Facebook -->
29+
<meta property="og:type" content="website">
30+
<meta property="og:url" content="https://cachecat.vercel.app/demo/">
31+
<meta property="og:title" content="CacheCat Demo Site - Test Website Storage Management">
32+
<meta property="og:description" content="Test CacheCat Chrome Extension with sample data. Create Cookies, Local Storage, Session Storage, IndexedDB, and Cache Storage entries.">
33+
<meta property="og:image" content="https://cachecat.vercel.app/og-image.png">
34+
<meta property="og:site_name" content="CacheCat">
35+
<meta property="og:locale" content="en_US">
36+
37+
<!-- Twitter -->
38+
<meta name="twitter:card" content="summary_large_image">
39+
<meta name="twitter:url" content="https://cachecat.vercel.app/demo/">
40+
<meta name="twitter:title" content="CacheCat Demo Site - Test Website Storage Management">
41+
<meta name="twitter:description" content="Test CacheCat Chrome Extension with sample data. Create Cookies, Local Storage, Session Storage, IndexedDB, and Cache Storage entries.">
42+
<meta name="twitter:image" content="https://cachecat.vercel.app/og-image.png">
43+
<meta name="twitter:creator" content="@chinmay29hub">
44+
45+
<!-- Favicon -->
46+
<link rel="icon" type="image/png" href="../icons/icon16.png">
47+
<link rel="apple-touch-icon" href="../icons/icon128.png">
48+
49+
<!-- Theme Color -->
50+
<meta name="theme-color" content="#667eea">
51+
52+
<!-- Preconnect for Performance -->
53+
<link rel="preconnect" href="https://fonts.googleapis.com">
54+
<link rel="dns-prefetch" href="https://github.com">
55+
56+
<!-- Structured Data -->
57+
<script type="application/ld+json">
58+
{
59+
"@context": "https://schema.org",
60+
"@type": "WebPage",
61+
"name": "CacheCat Demo Site",
62+
"description": "Test CacheCat Chrome Extension with sample data. Create Cookies, Local Storage, Session Storage, IndexedDB, and Cache Storage entries.",
63+
"url": "https://cachecat.vercel.app/demo/",
64+
"inLanguage": "en-US",
65+
"isPartOf": {
66+
"@type": "WebSite",
67+
"name": "CacheCat",
68+
"url": "https://cachecat.vercel.app/"
69+
},
70+
"datePublished": "2024-11-01",
71+
"dateModified": "2024-11-01"
72+
}
73+
</script>
74+
1775
<style>
1876
* {
1977
margin: 0;
@@ -1008,21 +1066,9 @@ <h2>⚡ Cache Storage</h2>
10081066
document.cookie = 'language=en-US; path=/; max-age=31536000';
10091067
document.cookie = 'preferences={"notifications":true,"autoSave":false}; path=/; max-age=86400';
10101068

1011-
// Create many more cookies for testing
1012-
for (let i = 1; i <= 100; i++) {
1013-
document.cookie = `cookie_${i}=value_${i}_${Date.now()}; path=/; max-age=86400`;
1014-
document.cookie = `pref_${i}=${JSON.stringify({id: i, name: `Item ${i}`, active: i % 2 === 0})}; path=/; max-age=86400`;
1015-
}
1016-
1017-
// Create cookies with different attributes
1018-
for (let i = 1; i <= 50; i++) {
1019-
document.cookie = `secure_cookie_${i}=secure_value_${i}; path=/; max-age=3600; secure`;
1020-
document.cookie = `session_${i}=session_data_${i}; path=/; max-age=7200`;
1021-
}
1022-
10231069
statusEl.innerHTML = '<span class="status success">✓ Cookies created successfully!</span>';
10241070
infoEl.style.display = 'block';
1025-
infoEl.textContent = 'Created 255 cookies:\n- 5 base cookies\n- 200 numbered cookies (cookie_1-100, pref_1-100)\n- 100 session/secure cookies\n\nTotal: 255 cookies';
1071+
infoEl.textContent = 'Created 5 cookies:\n- user_id\n- session_token\n- theme\n- language\n- preferences';
10261072
} catch (error) {
10271073
statusEl.innerHTML = '<span class="status error">✗ Error: ' + error.message + '</span>';
10281074
}
@@ -1047,46 +1093,9 @@ <h2>⚡ Cache Storage</h2>
10471093
localStorage.setItem('lastLogin', new Date().toISOString());
10481094
localStorage.setItem('favorites', JSON.stringify(['item1', 'item2', 'item3']));
10491095

1050-
// Create many more items for testing
1051-
for (let i = 1; i <= 500; i++) {
1052-
localStorage.setItem(`item_${i}`, `Value for item ${i} - ${Date.now()}`);
1053-
localStorage.setItem(`data_${i}`, JSON.stringify({
1054-
id: i,
1055-
name: `Item ${i}`,
1056-
description: `This is item number ${i} with some description text`,
1057-
timestamp: new Date().toISOString(),
1058-
tags: [`tag${i % 10}`, `category${i % 5}`],
1059-
metadata: {
1060-
created: Date.now(),
1061-
updated: Date.now() + i,
1062-
version: i % 10
1063-
}
1064-
}));
1065-
}
1066-
1067-
// Create large data items
1068-
const largeArray = Array.from({ length: 1000 }, (_, i) => ({
1069-
id: i,
1070-
value: `Large array item ${i}`,
1071-
data: `x`.repeat(100) // 100 character string
1072-
}));
1073-
localStorage.setItem('large_array', JSON.stringify(largeArray));
1074-
1075-
const largeObject = {};
1076-
for (let i = 0; i < 500; i++) {
1077-
largeObject[`key_${i}`] = {
1078-
value: `Value ${i}`,
1079-
nested: {
1080-
data: `Nested data ${i}`,
1081-
items: Array.from({ length: 10 }, (_, j) => `item_${i}_${j}`)
1082-
}
1083-
};
1084-
}
1085-
localStorage.setItem('large_object', JSON.stringify(largeObject));
1086-
10871096
statusEl.innerHTML = '<span class="status success">✓ Local Storage created successfully!</span>';
10881097
infoEl.style.display = 'block';
1089-
infoEl.textContent = 'Created 1,007 items:\n- 5 base items\n- 1,000 numbered items (item_1-500, data_1-500)\n- 1 large array (1,000 elements)\n- 1 large object (500 keys)\n\nTotal: 1,007 items';
1098+
infoEl.textContent = 'Created 5 items:\n- username\n- email\n- settings\n- lastLogin\n- favorites';
10901099
} catch (error) {
10911100
statusEl.innerHTML = '<span class="status error">✗ Error: ' + error.message + '</span>';
10921101
}
@@ -1114,28 +1123,9 @@ <h2>⚡ Cache Storage</h2>
11141123
timeSpent: 300
11151124
}));
11161125

1117-
// Create many more session items
1118-
for (let i = 1; i <= 300; i++) {
1119-
sessionStorage.setItem(`session_item_${i}`, `Session data ${i} - ${Date.now()}`);
1120-
sessionStorage.setItem(`page_${i}`, JSON.stringify({
1121-
pageId: i,
1122-
visited: new Date().toISOString(),
1123-
duration: Math.random() * 1000,
1124-
interactions: Math.floor(Math.random() * 50)
1125-
}));
1126-
}
1127-
1128-
// Create large session arrays
1129-
const sessionHistory = Array.from({ length: 200 }, (_, i) => ({
1130-
url: `https://example.com/page/${i}`,
1131-
timestamp: Date.now() - (200 - i) * 1000,
1132-
title: `Page ${i} Title`
1133-
}));
1134-
sessionStorage.setItem('session_history', JSON.stringify(sessionHistory));
1135-
11361126
statusEl.innerHTML = '<span class="status success">✓ Session Storage created successfully!</span>';
11371127
infoEl.style.display = 'block';
1138-
infoEl.textContent = 'Created 607 items:\n- 5 base items\n- 600 numbered items (session_item_1-300, page_1-300)\n- 1 session history array (200 elements)\n\nTotal: 607 items';
1128+
infoEl.textContent = 'Created 5 items:\n- sessionId\n- pageViews\n- cart\n- tempData\n- userActivity';
11391129
} catch (error) {
11401130
statusEl.innerHTML = '<span class="status error">✗ Error: ' + error.message + '</span>';
11411131
}
@@ -1198,51 +1188,12 @@ <h2>⚡ Cache Storage</h2>
11981188
// Add base products
11991189
productsStore.put({ id: 1, name: 'Laptop', price: 999.99, category: 'Electronics' });
12001190
productsStore.put({ id: 2, name: 'Mouse', price: 29.99, category: 'Electronics' });
1201-
1202-
// Add many more products
1203-
const categories = ['Electronics', 'Books', 'Clothing', 'Food', 'Toys', 'Sports', 'Home', 'Automotive'];
1204-
for (let i = 3; i <= 2000; i++) {
1205-
productsStore.put({
1206-
id: i,
1207-
name: `Product ${i}`,
1208-
price: (Math.random() * 1000).toFixed(2),
1209-
category: categories[i % categories.length],
1210-
description: `Detailed description for product ${i} with many features and specifications`,
1211-
inStock: i % 3 !== 0,
1212-
rating: (Math.random() * 5).toFixed(1),
1213-
reviews: Array.from({ length: Math.floor(Math.random() * 20) }, (_, j) => ({
1214-
id: j,
1215-
user: `User${j}`,
1216-
rating: Math.floor(Math.random() * 5) + 1,
1217-
comment: `Review comment ${j} for product ${i}`
1218-
})),
1219-
tags: [`tag${i % 10}`, `feature${i % 5}`, `brand${i % 3}`],
1220-
metadata: {
1221-
created: new Date(Date.now() - i * 3600000).toISOString(),
1222-
updated: new Date().toISOString(),
1223-
views: i * 100
1224-
}
1225-
});
1226-
}
1191+
productsStore.put({ id: 3, name: 'Keyboard', price: 79.99, category: 'Electronics' });
12271192

12281193
// Add base categories
12291194
categoriesStore.put({ id: 1, name: 'Electronics', description: 'Electronic devices' });
12301195
categoriesStore.put({ id: 2, name: 'Books', description: 'Physical and digital books' });
12311196

1232-
// Add more categories
1233-
for (let i = 3; i <= 100; i++) {
1234-
categoriesStore.put({
1235-
id: i,
1236-
name: `Category ${i}`,
1237-
description: `Description for category ${i} with detailed information`,
1238-
parentId: i > 10 ? (i % 10) + 1 : null,
1239-
metadata: {
1240-
productCount: i * 10,
1241-
active: i % 5 !== 0
1242-
}
1243-
});
1244-
}
1245-
12461197
await waitForTransaction(tx2);
12471198
db2.close();
12481199

@@ -1262,46 +1213,17 @@ <h2>⚡ Cache Storage</h2>
12621213
notesStore.put({ title: 'Meeting Notes', content: 'Discuss project timeline', createdAt: new Date().toISOString() }, 2);
12631214
notesStore.put({ title: 'Reminder', content: 'Call dentist tomorrow', createdAt: new Date().toISOString() }, 3);
12641215

1265-
// Add many more notes
1266-
for (let i = 4; i <= 1500; i++) {
1267-
notesStore.put({
1268-
title: `Note ${i}`,
1269-
content: `This is note number ${i} with detailed content. It contains multiple paragraphs and various information. ${'Lorem ipsum dolor sit amet. '.repeat(10)}`,
1270-
createdAt: new Date(Date.now() - i * 60000).toISOString(),
1271-
updatedAt: new Date().toISOString(),
1272-
tags: [`tag${i % 20}`, `category${i % 5}`],
1273-
priority: i % 4,
1274-
archived: i % 10 === 0,
1275-
metadata: {
1276-
wordCount: i * 10,
1277-
characterCount: i * 50,
1278-
attachments: Array.from({ length: i % 5 }, (_, j) => `file${j}.pdf`)
1279-
}
1280-
}, i);
1281-
}
1282-
12831216
// Add base tags
12841217
tagsStore.put({ name: 'Important', color: 'red' }, 'tag1');
12851218
tagsStore.put({ name: 'Personal', color: 'blue' }, 'tag2');
1286-
1287-
// Add more tags
1288-
const colors = ['red', 'blue', 'green', 'yellow', 'purple', 'orange', 'pink', 'gray'];
1289-
for (let i = 3; i <= 200; i++) {
1290-
tagsStore.put({
1291-
name: `Tag ${i}`,
1292-
color: colors[i % colors.length],
1293-
description: `Description for tag ${i}`,
1294-
usageCount: i * 5,
1295-
created: new Date(Date.now() - i * 86400000).toISOString()
1296-
}, `tag${i}`);
1297-
}
1219+
tagsStore.put({ name: 'Work', color: 'green' }, 'tag3');
12981220

12991221
await waitForTransaction(tx3);
13001222
db3.close();
13011223

13021224
statusEl.innerHTML = '<span class="status success">✓ IndexedDB created successfully!</span>';
13031225
infoEl.style.display = 'block';
1304-
infoEl.textContent = 'Created 3 databases:\n1. UsersDB (inline keys)\n - users store: 1,000 records\n2. ProductsDB (inline keys)\n - products store: 2,000 records\n - categories store: 100 records\n3. NotesDB (out-of-line keys)\n - notes store: 1,500 records\n - tags store: 200 records\n\nTotal: 4,800 records';
1226+
infoEl.textContent = 'Created 3 databases:\n1. UsersDB (inline keys)\n - users store: 3 records\n2. ProductsDB (inline keys)\n - products store: 3 records\n - categories store: 2 records\n3. NotesDB (out-of-line keys)\n - notes store: 3 records\n - tags store: 3 records\n\nTotal: 14 records';
13051227
} catch (error) {
13061228
statusEl.innerHTML = '<span class="status error">✗ Error: ' + error.message + '</span>';
13071229
}
@@ -1353,53 +1275,16 @@ <h2>⚡ Cache Storage</h2>
13531275
await cache1.put('/api/users', new Response(JSON.stringify([{ id: 1, name: 'User 1' }]), {
13541276
headers: { 'Content-Type': 'application/json' }
13551277
}));
1356-
1357-
// Add many more API cache entries
1358-
for (let i = 1; i <= 500; i++) {
1359-
await cache1.put(`/api/items/${i}`, new Response(JSON.stringify({
1360-
id: i,
1361-
name: `Item ${i}`,
1362-
data: `Data for item ${i}`,
1363-
timestamp: new Date().toISOString(),
1364-
metadata: {
1365-
version: i % 10,
1366-
tags: [`tag${i % 20}`, `category${i % 5}`]
1367-
}
1368-
}), {
1369-
headers: { 'Content-Type': 'application/json' }
1370-
}));
1371-
}
1372-
1373-
// Add paginated API endpoints
1374-
for (let page = 1; page <= 100; page++) {
1375-
const items = Array.from({ length: 20 }, (_, i) => ({
1376-
id: (page - 1) * 20 + i + 1,
1377-
name: `Item ${(page - 1) * 20 + i + 1}`,
1378-
page: page
1379-
}));
1380-
await cache1.put(`/api/items?page=${page}`, new Response(JSON.stringify({
1381-
page,
1382-
totalPages: 100,
1383-
items
1384-
}), {
1385-
headers: { 'Content-Type': 'application/json' }
1386-
}));
1387-
}
1278+
await cache1.put('/api/products', new Response(JSON.stringify([{ id: 1, name: 'Product 1' }]), {
1279+
headers: { 'Content-Type': 'application/json' }
1280+
}));
13881281

13891282
// Cache 2: Images Cache
13901283
const cache2 = await caches.open('images-cache-v1');
13911284
const imageBlob = new Blob(['fake image data'], { type: 'image/png' });
13921285
await cache2.put('/images/logo.png', new Response(imageBlob));
13931286
await cache2.put('/images/banner.jpg', new Response(imageBlob));
13941287

1395-
// Add many more image cache entries
1396-
for (let i = 1; i <= 300; i++) {
1397-
const imageData = `Fake image data for image ${i} - ${'x'.repeat(100)}`;
1398-
const blob = new Blob([imageData], { type: i % 2 === 0 ? 'image/png' : 'image/jpeg' });
1399-
await cache2.put(`/images/photo_${i}.${i % 2 === 0 ? 'png' : 'jpg'}`, new Response(blob));
1400-
await cache2.put(`/images/thumbnails/thumb_${i}.jpg`, new Response(blob));
1401-
}
1402-
14031288
// Cache 3: Static Assets - Cache actual files that can be refetched
14041289
const cache3 = await caches.open('static-assets-v1');
14051290

@@ -1462,7 +1347,7 @@ <h2>⚡ Cache Storage</h2>
14621347

14631348
statusEl.innerHTML = '<span class="status success">✓ Cache Storage created successfully!</span>';
14641349
infoEl.style.display = 'block';
1465-
infoEl.textContent = 'Created 3 caches:\n1. app-cache-v1: 602 entries (2 base + 500 items + 100 pages)\n2. images-cache-v1: 602 entries (2 base + 600 images)\n3. static-assets-v1: 2 entries\n\nTotal: 1,206 cache entries\n\n💡 To test refetch:\n- Serve this demo via HTTP (python3 -m http.server)\n- Open CacheCat dashboard\n- Click 🔄 refetch on styles.css\n- Modify styles.css file\n- Refetch again to see updated content';
1350+
infoEl.textContent = 'Created 3 caches:\n1. app-cache-v1: 3 entries\n2. images-cache-v1: 2 entries\n3. static-assets-v1: 2 entries\n\nTotal: 7 cache entries\n\n💡 To test refetch:\n- Serve this demo via HTTP (python3 -m http.server)\n- Open CacheCat dashboard\n- Click 🔄 refetch on styles.css\n- Modify styles.css file\n- Refetch again to see updated content';
14661351
} catch (error) {
14671352
statusEl.innerHTML = '<span class="status error">✗ Error: ' + error.message + '</span>';
14681353
}

0 commit comments

Comments
 (0)