c# - MVC Intermediate page between redirecting to another long load time page -
how using mvc c# (without use of js or jquery) can send user /home/stasis
load loader image (already implemented using css), , send them final url (which has long load time, , users end clicking multiple times - not helping themselves)
the problem use of js , jquery won't work, needs work in-app webview (which doesn't support either js or jquery). go /home/index
click on link take me /home/stasis
load, automatically begin loading final url lets google.com example.
without javascript, have hope browser , server right thing:
- the browser display entity content when server returns 307 redirect.
- the server not return partial entity while long-running request pending. in other words. long-running request should return entity data in final second request.
- the browser won't clear screen until first bytes of next entity have arrived.
assuming browser , server behave this, mvc doesn't offer easy way it. need to:
- create new class derived actionresult.
- in actionresult's executeresult() method, write output controllercontext.httpcontext.response. set response code 307, set redirectlocation, , write whatever content want display outputstream.
Comments
Post a Comment