Pregunta

Building an offline web app in VS2010. I have a master page with a navigation menu control. So far I've been able to add 4 new pages, each navigated to from this menu control. All has been added to the Cache Manifest file and all has worked offline up until now. After the most recent page was added to the project, now when I am offline, my menu control doesn't load properly and the console shows that the webresource.axd for the menu control couldn't be found and then gives the sys is not defined error. The error does not occur just by navigating to a page, only when button is clicked that causes a location.reload(true).

I've seen from VS where things will be working and then when you restart VS the next morning stuff will suddenly be broken. But I mean this is really blowing my mind.

Is there another way maybe to refresh an offline page such that the controls reset back to original value? That is the only reason I am doing the refresh.

¿Fue útil?

Solución

It was something so simple I am embarrassed. I changed location.reload(true) to location.reload(false). That way, it wasn't trying to reload the page from the server. All fixed.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top