how to correctly setup page caching for Nitrogen pages?

61 views
Skip to first unread message

Roman Shestakov

unread,
Nov 11, 2012, 6:54:08 PM11/11/12
to nitro...@googlegroups.com
hello,

I am trying to cache some dynamincally generated with Nitrogen pages so I could come back to them with back button.

What is the best way to do this?

Regards, Roman

Jesse Gumm

unread,
Nov 12, 2012, 3:20:33 PM11/12/12
to nitrogenweb
Hi Roman,

I don't have a great answer for you here, as there's no real built-in
mechanism for accomplishing this.

The way I've done something *like* this in the past is to use location
rewriting mechanism in the modern browsers (or fallback to the
hashbang URLs for IE). I've used
https://github.com/balupton/History.js/ with some success in the past
for accomplishing this.

Otherwise, you're kind of on your own there to come up with your own
mechanism. Perhaps storing some kind of extended state information in
the session.

-Jesse
> --
> You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To post to this group, send email to nitro...@googlegroups.com.
> To unsubscribe from this group, send email to nitrogenweb...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nitrogenweb?hl=en.
>



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Roman SHESTAKOV

unread,
Nov 12, 2012, 3:57:15 PM11/12/12
to nitro...@googlegroups.com, nitrogenweb
Thanks a lot Jesse
Regards, Roman

Sent from my iPad

Roman Shestakov

unread,
Jan 3, 2013, 8:40:10 AM1/3/13
to nitro...@googlegroups.com

Hi Jesse,

thanks for suggestion to use History.js - this is indeed the most widely used lib to work with History API

I put together a detailed example here:
http://rshestakov.wordpress.com/2013/01/03/how-to-use-html5-history-api-with-nitrogen/

hopefully, this will be useful for somebody

Regards, Roman
Reply all
Reply to author
Forward
0 new messages