javascript - Create Temporary Webpage with Randomly Generated URL -


alright, i'm trying write little app creates temporary webpage (kinda) , can't figure out needs happen work exactly.

let me explain i'm trying , should help. basically, want have app.com , when user goes there there's button "make temp page" or something. click , makes random url extension , puts visitor there, app.com/admin/xxyy12. user can give url app.com/xxyy12 , can navigate there , send data , forth between each other, thinking via websockets. want person made link admin of sorts , when leave "admin" page want , app.com/xxyy12 self destruct basically, no 1 can go there , route doesn't exist anymore.

is possible , technologies should accomplish this? thought cool in-browser no server, kills security don't care that. i'm not sure how create these "temporary" pages either. figured websockets come in handy send data between person created link , client visiting it, , figured main page app.com need socket user @ app.com/admin/xxyy12 determine when disconnects. also, considered html parameters make "temporary" url read param , wire client url creator. there need way of storing active temporary pages exist.

i recognize question rather vague suppose i'm looking ideas of how accomplish , technologies recommended. , help.

this should easy implement. use: node.js on server express.js , maybe socket.io if needed

in express: create routes serve pages

app.get('/', function(req, res){ //render homepage here }); app.post('/', function(req,res){ // handle creating temp pages here , // redirect client page // save id of page db }); app.get('/:pageid', function(req,res){ // handle rendering temp page id }); app.post('/destroy', function(req,res){ // remove page db }); 

you post client on javascript unload message think, maybe no need websockets im not sure how reliable is

i hope helps


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -