
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@nitsantechnologies/ns-pwa
Advanced tools
Simple and easy to integrate most popular PWA feature to your love website. Please perform easy installation guide below to quickly enable PWA feature.
Features:
Advantages:
# You can install lozad with npm
$ npm i @nitsantechnologies/ns-pwa
# Alternatively you can use Yarn
$ yarn add @nitsantechnologies/ns-pwa
Then with a module bundler like rollup or webpack, use as you would anything else:
// using ES6 modules
import NsPwa from "@nitsantechnologies/ns-pwa";
const NsPwaVar = new NsPwa({
//Add Your Site/App Short Name
pwa_short_name: "<Application Short Name>",
// Add your Site/App Name
pwa_name: "<Application Name>",
// Add your Site/App Start URL (Like: (/), (https://example.com/), (https://example.com/blog))
pwa_start_url: "Main URL (like: / or https://example.com/)",
// Add your Site/App Background Color (Like: #000, #fff, RGB(0,0,0))
pwa_background_color: "Background Color",
// Add your Site/App Display
pwa_display: "standalone",
// Add your Site/App Theme Color (Like: #000, #fff, RGB(0,0,0))
pwa_theme_color: "Theme Color",
// Add your Site/App Icons
pwa_icon_48: "/pwa/icon/pwa-48.png",
pwa_icon_72: "/pwa/icon/pwa-72.png",
pwa_icon_96: "/pwa/icon/pwa-96.png",
pwa_icon_144: "/pwa/icon/pwa-144.png",
pwa_icon_192: "/pwa/icon/pwa-192.png",
pwa_icon_512: "/pwa/icon/pwa-512.png",
//You can see your JSON Code with this option
pwa_get_json: true,
});
//Add Code On Service-Worker JS
const dataCacheName = 'App Data';
const cacheName = 'App';
const filesToCache = [
'/',
'/pwa/pwa.png',
];
//install the sw
self.addEventListener('install', function (e) {
console.log('[ServiceWorker] Install');
e.waitUntil(
caches.open(cacheName).then(function (cache) {
console.log('[ServiceWorker] Caching app shell');
return cache.addAll(filesToCache);
})
);
});
self.addEventListener('activate', function (e) {
console.log('[ServiceWorker] Activate');
e.waitUntil(
caches.keys().then(function (keyList) {
return Promise.all(keyList.map(function (key) {
if (key !== cacheName && key !== dataCacheName) {
console.log('[ServiceWorker] Removing old cache', key);
return caches.delete(key);
}
}));
})
);
return self.clients.claim();
});
self.addEventListener('fetch', function (e) {
console.log('[Service Worker] Fetch', e.request.url);
e.respondWith(
caches.match(e.request).then(function (response) {
return response || fetch(e.request);
})
);
});
<!-- You can create JSON file Manually with *pwa_get_json* This option-->
<link rel="manifest" href="/pwa/manifest.json" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<!-- Add Your Site Name on Content-->
<meta name="apple-mobile-web-app-title" content="Your_site" />
<!-- Add your ISO PNG Path -->
<link rel="apple-touch-icon" href="/pwa/pwa.png" />
<meta name="msapplication-TileImage" content="/pwa/pwa.png" />
<meta name="theme-color" content="#000" />
<meta name="msapplication-TileColor" content="#000" />
Available in latest browsers.
Interested in contributing features and fixes?
FAQs
Ns PWA Builder
We found that @nitsantechnologies/ns-pwa demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.