0

Is there a way to "Refresh" the preview?

Sigma8 9 years ago updated by Alexander Blach (Developer) 9 years ago 2

 I just bought Textastic last week in order to make some changes to a website remotely with my iPad and was immediately impressed! 


However, right now I'm trying to use it for actual web app creation, and I'm having a problem with the Preview functionality failing to recognize changes I've made to my .css files.


My example case starts with two very simple files: an index.html with a styled (class="test") "Hello World", and a stylesheet with a single dot-style (.test), which makes the font big and red.


I make these, and everything seems to work fine when I preview. However, then I change the color to yellow (in the .css) and I preview the change in the index.html file, and the font is still red.


Confused, I upload the files to my web server, and it is indeed yellow. I try making a "styles2.css" and I copy/paste the contents of styles.css into styles2. I change the stylesheet href in index.html to styles2, and I preview that. Now it's yellow! I changes it back to styles.css (remember, styles.css and styles2.css are identical--it was just a copy/paste) and things are back to red.


So, it seems as if Preview is aggressively caching files. Is there any way to force a refresh of asset files? I'm just using local storage for both index.html and styles.css, and they are in the same folder.

One more detail I forgot to mention: I'm using the iOS 5 beta #5, which means the preview may be using the snappier "Nitro" engine, assuming the app is using the UIWebView stuff. 

To prevent this problem, I disabled caching. But, maybe there were some changes in iOS 5 beta. I'll try to reproduce the issue.