concept proxy page in category arcgis

This is an excerpt from Manning's book ArcGIS Web Development.
But the ArcGIS JavaScript API is smart enough to recognize this, and so it tries to use a proxy page to pass this information as a POST request, which isn’t subject to the same character limits. In the preceding message, the API is letting you know that you’re trying to perform a task that requires a proxy page. Please see appendix C for more details on setting up the proxy page.
So how do you use a proxy page inside the ArcGIS API for JavaScript? Once you set up the proxy page per the instructions in appendix C (I’ll assume you have the proxy in the root of your project), you can add this line of code just before you add the FeatureLayer to the map using the esri/config module aliased as esriConfig:
To tell your application to use the proxy page for all its requests, add the code as shown in the following listing to js/main.js where the application starts to load.
The proxy page is a great tool to use in a variety of scenarios. As I mentioned, it may even be a requirement if your application makes large requests that could exceed the browser limit. It’s also a great option when developing with secured services so you don’t have to log in each time. The drawback to this technique is that tokens don’t last forever, so you need to set up a schedule to replace the tokens as needed. When using tokens from ArcGIS Online, the maximum duration is 15 days.