u/Constant-Box4994

Is it possible to update the previous page's DOM/state using core JavaScript?

I'm creating a Reddit style social network as a final course project with Laravel and core JavaScript (no framework).

I'm using async fetch requests and Dom manipulation for actions like like/dislike/delete so the page doesn't refresh or goes back to the top.

On the posts index page, when a delete request succeeds, I remove the .postCard from the Dom.

But here's the problem:

If I'm inside the post show page (/posts/1), delete the post there, and then press the browser back button, the deleted post still appears on the previous page until refresh.

How should I handle updating the previous page's DOM/state in this situation using core JavaScript?

Is there a standard approach for this without using a frontend framework?

reddit.com
u/Constant-Box4994 — 5 days ago

Did anyone lose their dawn of fire account? Installed it after years, and it's gone.

I believe that I had it saved in my Facebook. And after years I installed it again, but there is no facebook option.

I remember I had to push my progress from facebook to google in the main game too for some reason. But there is no option here.

Can I restore it somehow? I finished every island in there and now have to start again :(

reddit.com
u/Constant-Box4994 — 10 days ago

How can I do add an image to a form data?

Hi, I want to add multiple images to the form for image type post. But I don't want to just take multiple images in browse file. I want to add them one by one with browse file, and them showing on the form, we can remove it from there or we can add more to that.

And also changing their order with dragging.

What should I search to find this type of thing?

reddit.com
u/Constant-Box4994 — 14 days ago