What role do framesets play in preserving the original URL format when changing index files?
Framesets can be used to preserve the original URL format when changing index files by keeping the main URL constant while loading different content within a frame. This allows for seamless navigation between different pages without changing the main URL displayed in the browser address bar.
<!DOCTYPE html>
<html>
<head>
<title>Frameset Example</title>
</head>
<frameset cols="20%,80%">
<frame src="menu.html" name="menu">
<frame src="content.html" name="content">
</frameset>
</html>