SvelteKit detector

SvelteKit logo

How can you detect if a website uses SvelteKit?

Detecting if a website uses SvelteKit involves identifying specific markers that are characteristic of SvelteKit applications.

Here’s a step-by-step guide on how to do it:

  1. Open the Page Source: Right-click on the webpage and select “View Page Source” or press Ctrl+U (Windows) or Cmd+Option+U (Mac) to open the page’s source code.
  2. Search for SvelteKit-Specific Markers: Use Ctrl+F (Windows) or Cmd+F (Mac) to open the search function and look for the following keywords:
    • __sveltekit: This special variable is used in SvelteKit applications for routing and session management. If you find it in the page source, it’s a strong indicator that the site is using SvelteKit.
    • js/svelte: Check for any JavaScript files linked within the source that have “svelte” in their file path. This could indicate the use of Svelte or SvelteKit components.
  3. Check for SvelteKit Entry Point: Look for the main entry point in the HTML file. In SvelteKit, you may find a tag like: <script src="/build/bundle.js"></script> This is often where the main JavaScript file compiled by SvelteKit is included.
  4. Inspect Network Activity: Open the Developer Tools (press F12 or right-click on the page and select “Inspect”) and go to the “Network” tab. Look for requests that return HTML with SvelteKit-specific pages, or inspect the GET requests made for various routes that are part of the application.
  5. Look for Dynamic Routing: If the website shows dynamic content loading without page refreshes or uses load functions in its scripts, it’s likely using SvelteKit’s routing capabilities.
  6. Check for SvelteKit Style Setup: SvelteKit applications often include global stylesheets and reset stylesheets set up in a specific way. Look for linked stylesheets that are organized in the /src/app.css or similar paths.
  7. Check the Console for SvelteKit Messages: Open the browser console (usually by pressing F12 and navigating to the “Console” tab) and look for any messages related to Svelte or SvelteKit, especially during errors or logs.