PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, August 13, 2022

[FIXED] How to keep a non-form page from refreshing when refresh is clicked?

 August 13, 2022     css, dom, html, javascript, jquery     No comments   

Issue

I'm trying to figure out how to keep a webpage the same view on user refresh, as opposed to going to a homepage. Is it best to use jQuery with CSS to keep the same page? When I use jQuery with CSS, on user refresh, a glimpse of the homepage shows, just for a second but doesn't look right to me. I've tried the preventDefault method, but from what I understand, this is mostly for form inputs. Is that correct? I'm currently querying to keep the home-page hidden with CSS, if the data-view is not the homepage, but I'm not sure if this is the best way. Can someone please give me some insight with keeping a page-view the same with user refresh?


Solution

You can display something like a loader icon while the page is loading, but you can't display the page in my opinion because it takes time the load that's why you see that.

For example, by displaying the loader icon, you can refer to this or search for other approaches.



Answered By - Raphael Ben Hamo
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing