# CustomFit JS Script

**What are the different modes to configure the CustomFit's client SDK (java-script)?**�

CustomFit provides 2 modes

1. **Classic (Sync) mode**: When the webpage loads, it will be hidden, and after fetching and applying the personalized content changes, the webpage will be made visible.
2. **Intelligent (Async, preferred one)**: When the web page loads, it first intelligently hides only those elements that are personalized and page load won't be blocked. And after fetching the personalized changes are applied those elements will be made visible.

**Why the CustomFit \<script> needs to be added without async or deferred attribute?** �

Typically for any personalization or A/B test platforms, the script has to be sync, because the content changes need to be applied before the page is visible, else it will result in flickering (the visitors see the old content getting replaced by the new content)

But CustomFit's intelligent mode won't block the page loading after the script has been downloaded as all the fetching & applying of the personalized content changes happens in async mode.

�


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.customfit.ai/frequently-asked-questions/customfit-js-script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
