Re: Exists, there is a, etc.
Posted: Tue May 29, 2012 3:52 pm
Ok… I have setup a network filter on my Mac so I can monitor outgoing connections and this appears to be a cacheing issue. Here is what is going on:
On hosted sites that do not have a custom 404 page, if the file in turl exists, "get url turl" connects to the server the first time and downloads the data. Subsequent calls to "get url turl" do not establish an outgoing connection, but the content of turl is still returned. Obviously the content of turl is cached somewhere.
if the file referenced in turl does not exist, an outgoing connection is established every time "get url turl" is called, and nothing is returned (so nothing is cached).
==========================
On the hosted domains where there is a custom 404 page configured, the url passed to "get url" initially connects to the server. This happens whether or not the file exists. Subsequent calls to "get url" with the same url does not establish an outgoing connection regardless of whether or not the file exists.
I believe the difference here is due to the custom 404 page redirect, where there is a file with data that is returned when a referenced file does not exist. What is odd is that the html of the custom 404 page is not returned in iOS, where it is on the desktop in LC.
So there are two issues here. The first being, in iOS, no result returned when the file does not exist. The second is that the html of the custom 404 redirect is also not being returned in iOS as it is on the desktop.
So, I guess a work around that would apply to my app would be a way to clear the cached data described above. Unfortunately I don't see a command in Dictionary that accomplishes this. Does anyone know a way to do this?
On hosted sites that do not have a custom 404 page, if the file in turl exists, "get url turl" connects to the server the first time and downloads the data. Subsequent calls to "get url turl" do not establish an outgoing connection, but the content of turl is still returned. Obviously the content of turl is cached somewhere.
if the file referenced in turl does not exist, an outgoing connection is established every time "get url turl" is called, and nothing is returned (so nothing is cached).
==========================
On the hosted domains where there is a custom 404 page configured, the url passed to "get url" initially connects to the server. This happens whether or not the file exists. Subsequent calls to "get url" with the same url does not establish an outgoing connection regardless of whether or not the file exists.
I believe the difference here is due to the custom 404 page redirect, where there is a file with data that is returned when a referenced file does not exist. What is odd is that the html of the custom 404 page is not returned in iOS, where it is on the desktop in LC.
So there are two issues here. The first being, in iOS, no result returned when the file does not exist. The second is that the html of the custom 404 redirect is also not being returned in iOS as it is on the desktop.
So, I guess a work around that would apply to my app would be a way to clear the cached data described above. Unfortunately I don't see a command in Dictionary that accomplishes this. Does anyone know a way to do this?