navigator.serviceWorker.register('/service-worker.js').then(function(registration) { console.log('Service Worker registered with scope:', registration.scope); }).catch(function(error) { console.log('Service Worker registration failed:', error); }); // 监听来自 Service Worker 的消息 navigator.serviceWorker.addEventListener('message', (event) => { const currentSite = event.data.currentSite if (currentSite) { // 将 currentSite 存储到 cookie 中 document.cookie = "current_site="+ currentSite + "; path=/; Secure"//注意这里不需要再次编码,sw已经编码过了 console.log('current_site saved to cookie in index:', currentSite) } });

Book your next adventure

Accommodation Background | www.Tripcetera.com | Dream Click Go
Accommodation
Hotel Rooms and Homes
Transportasi Background | www.Tripcetera.com | Dream Click Go
Transportation
Flights, Ferry, Car Rental and More
Etcetera Background | www.Tripcetera.com | Dream Click Go
Et Cetera
Spa, Attractions, Tours and More
Join as a host | www.Tripcetera.com | Dream Click Go

Join Our Travel Marketplace

  •  Fast & Easy Booking
  •  Secure Transactions
  •  Competitive Rates
  •  Wide Range of Services
  •  List your Property or Service(s) for free
Join as a Host

To travel is to live!

On your next trip, book your accommodation via Tripcetera and enjoy great deals. You can choose from over 390K+ Hotel properties worldwide!

Book Now