By default, Safari on iPhone/iPad keeps your browsing history for 30 days. However, this setting can be changed to keep your browsing history for a longer or shorter period of time, or to prevent Safari from keeping your history at all.
To check or change the browsing history settings on your iPhone/iPad, follow these steps:
1. Open the Settings app on your device.
2. Scroll down and select "Safari."
3. Scroll down to the "History" section.
Here you can choose how long Safari should keep your browsing history by selecting from the following options: "All time," "1 year," "6 months," "3 months," or "1 month." Alternatively, you can choose to "Clear History and Website Data" to remove all your browsing history.
Note that if you have turned on Private Browsing mode, your browsing history will not be saved, regardless of your settings. Also, if your device is synced with iCloud, your browsing history may be stored in iCloud and available across all your devices.