Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors:
- family-names: "Sri Raman"
given-names: "Varna"
title: "Narratives, Numbers, and Democratic Accountability: India's Economic Transformation 2014-2026"
version: 3.0.1
version: 3.0.2
date-released: 2026-05-09
url: "https://github.com/Varnasr/someperspective"
repository-code: "https://github.com/Varnasr/someperspective"
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta name="version" content="3.0.1">
<meta name="version" content="3.0.2">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://translate.google.com https://translate.googleapis.com https://www.gstatic.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://www.gstatic.com https://translate.googleapis.com; font-src 'self' https://fonts.gstatic.com data:; img-src 'self' data: https://cdn.jsdelivr.net https://translate.googleapis.com https://www.gstatic.com; connect-src 'self' https://translate.googleapis.com; frame-src https://translate.googleapis.com; object-src 'none'; base-uri 'self';">
<title>Some Perspective | India's Economy, Inequality & Democracy 2004-2026 | Data-Driven Analysis</title>
<meta name="description" content="Independent data-driven research on India's political economy (2004-2026): GDP growth vs jobless recovery, top 1% owning 40% of wealth, democratic backsliding, and three novel indices (SSI, FCI, DQI). Interactive charts, downloadable data, and policy recommendations.">
Expand Down
41 changes: 7 additions & 34 deletions sw.js
Original file line number Diff line number Diff line change
@@ -1,38 +1,11 @@
const CACHE_NAME = 'sp-v3.0.1';
const SHELL = [
'/',
'/index.html',
'/app.js',
'/styles.css',
'/data.json',
'/manifest.json'
];

self.addEventListener('install', e => {
e.waitUntil(
caches.open(CACHE_NAME).then(cache => cache.addAll(SHELL))
);
self.skipWaiting();
});

// Self-destruct: clear all caches and unregister.
// The aggressive shell-caching SW from v3.0.0 cached broken HTML;
// this replacement wipes the slate clean on next visit.
self.addEventListener('install', () => self.skipWaiting());
self.addEventListener('activate', e => {
e.waitUntil(
caches.keys().then(keys =>
Promise.all(keys.filter(k => k !== CACHE_NAME).map(k => caches.delete(k)))
)
);
self.clients.claim();
});

self.addEventListener('fetch', e => {
if (e.request.method !== 'GET') return;
e.respondWith(
fetch(e.request)
.then(resp => {
const clone = resp.clone();
caches.open(CACHE_NAME).then(cache => cache.put(e.request, clone));
return resp;
})
.catch(() => caches.match(e.request))
caches.keys().then(keys => Promise.all(keys.map(k => caches.delete(k))))
.then(() => self.clients.claim())
.then(() => self.registration.unregister())
);
});
Loading