instant-markdown-d icon indicating copy to clipboard operation
instant-markdown-d copied to clipboard

No data after refreshing view

Open chreekat opened this issue 11 years ago • 6 comments

While using vim-instant-markdown, if I refresh the browser on localhost:8090, no data is shown.

The network status looks like this:

image.png

And the detailed info on the last item is this:

image.png

chreekat avatar Dec 08 '12 20:12 chreekat

Hmmm, honestly I'm not surprised. The backend server is quite spartan and I never considered the "refresh" case when writing it. What are you hitting refreshing for?

suan avatar Dec 08 '12 20:12 suan

P/S: a day after image attachments gets released and you're already making use of it - Nice! :smile:

suan avatar Dec 08 '12 20:12 suan

Haha, I know, I saw the GH notice about images and thought, "ooh!"

It's not just refreshes. It's reloads of any sort. Usually I find them happening when I (a) accidentally close the tab and try to reopen it, or (b) follow a link on the Markdown file and then go back.

On 12/8/12, suan [email protected] wrote:

P/S: a day after image attachments gets released and you're already making use of it - Nice! :smile:


Reply to this email directly or view it on GitHub: https://github.com/suan/instant-markdown-d/issues/9#issuecomment-11163393

chreekat avatar Dec 08 '12 20:12 chreekat

So I'm very close to completing the rewrite of the backend, which will remove all Ruby dependencies and be much more performant. I'll look into this after that. However, I don't think refresh/back will work without reworking the fundamentals...

There's a highlevel explanation of how everything works here: https://github.com/suan/vim-instant-markdown/issues/13 As you can see, it would be hard for refreshes to work because we don't actually serve up a page, instead all content is sent over the websocket.

suan avatar Dec 10 '12 19:12 suan

Consider looking at testacular... they do something similar, but manage to track when browsers detach and reattach to the server. (I haven't looked at it myself...)

chreekat avatar Dec 10 '12 19:12 chreekat

I suppose the websocket could inform the server when the user is leaving the page, and the server could reinitiate the websocket upon the next request, or something to that effect... if you'd like to contribute that'd be great! (it's just Javascript :wink:)

suan avatar Dec 10 '12 20:12 suan