# Ignition webserver question

**URL:** <https://forum.inductiveautomation.com/t/ignition-webserver-question/33169>\
**Category:** Ignition\
**Created:** [March 17, 2020, 3:58pm UTC](https://forum.inductiveautomation.com/t/ignition-webserver-question/33169 "2020-03-17T15:58:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [March 17, 2020, 3:58pm UTC](https://forum.inductiveautomation.com/t/ignition-webserver-question/33169/1 "2020-03-17T15:58:48Z")

</div>

If I place a file in C:\Program Files\Inductive Automation\Ignition\webserver\webapps\main on the Ignition server I can use system.net.openURL(“[http://servername:8088/main/filename](http://servername:8088/main/filename)”) to access it from the clients. However, if I change the file the clients continue to display the old one. How is this cache refreshed?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 17, 2020, 4:12pm UTC](https://forum.inductiveautomation.com/t/ignition-webserver-question/33169/2 "2020-03-17T16:12:38Z")

</div>

The answer is it’s up to jetty. The webserver/webapps/main file-hosting method has never been supported; it really only works by accident.

What _might_ work is a lazy cache-busting via URL parameter; eg: instead of `openURL("path/tofilename")`, use `openURL("path/to/filename?time=%s" % system.date.toMillis(system.date.now()))`  
The end goal being to technically request a different URL each time, even though the query parameter will be ignored.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 17, 2020, 4:29pm UTC](https://forum.inductiveautomation.com/t/ignition-webserver-question/33169/3 "2020-03-17T16:29:46Z")

</div>

> [@paul-griffith](#):
>
> cache-busting via URL parameter

Huh. I was under the impression that folder was only scanned by jetty on gateway startup. I'd be nice to be wrong about that.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 17, 2020, 4:33pm UTC](https://forum.inductiveautomation.com/t/ignition-webserver-question/33169/4 "2020-03-17T16:33:05Z")

</div>

AFAIK, you can hot-load content by dropping it in there. I think (at least with our current version of Jetty) it checks the direct path as a last resort since there’s no servlet mounted to handle things at that path. On Windows, it holds a lock to the file (meaning you can’t delete a file that’s been served at least once with the gateway running), which implies there’s some kind of internal cache or something along those lines, but again, entirely out of our hands 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [June 18, 2020, 2:19pm UTC](https://forum.inductiveautomation.com/t/ignition-webserver-question/33169/5 "2020-06-18T14:19:53Z")

</div>

You can set `UseFileMappedBuffer` to false in the `webdefault.xml` Jetty config to enable hotloading (also on Windows, it doesn’t keep a lock that way).

I never tested it on Ignition 8 though.
