![]() |
|
Problem with cache and 404 error - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: Problem with cache and 404 error (/thread-3983.html) |
Problem with cache and 404 error - troberts - 03-25-2024 Hi, I have an IW application which is sometimes called with a parameter in the URL. https://mycompany.com/$/start/myparam The first time I call this it works fine. In the ServerController the BeforeDispatch event is called, then AfterDispatch, then UserSessionBaseCreate, then ServerControllerBaseNewSession, then the main form is displayed. But, the second time I call it only the ServerController BeforeDispatch and AfterDispatch events are fired. Nothing else. Then the browser displays a 404 error. If I open a second tab in the browser and clear the cache I can return to the first tab, refresh it and everything is normal. In the ServerControllerBeforeDispatch event, I am setting aReply.AllowCaching to false. I've also experimented with including the following lines: // aReply.Headers.Add('Cache-control: no-cache'); // aReply.Headers.Add('Cache-control: no-store'); // aReply.Headers.Add('Pragma: no-cache'); // aReply.Headers.Add('Expires: 0'); None of them make any difference. Subsequent calls to https://mycompany.com/$/start/myparam result in a 404 error. This lasts until either the browser cache is cleared or the IW server is restarted. Any ideas? Thanks, Tim RE: Problem with cache and 404 error - Alexandre Machado - 04-03-2024 I think you are using path info as a parameter. If you need to pass a parameter, use a parameter not path info. URL parameters (or query fields) are passed as: https://mycompany.com/$/start/?myparam Parameters passed that way - as true parameters - are not cached. |