page caching and js

Is it possible to force the browser to show the cached page when the server is down?

If the answer is yes then  is it  possible to trigger a cached JS code and forward the visitor to  a working url?
LVL 1
myyisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WebberCommented:
Not sure what you're trying to achieve here.

I do have a few general suggestions:

Before getting into cache:

Maybe it is easiest to make a landing/redirect page that'll take a client to the latest correct page.

Into cache:

On a page you can enable caching. Look here for how you use the right headers: https://www.mobify.com/blog/beginners-guide-to-http-cache-headers/

Look here for some more info on caching: http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/
On the above link it is explained how a page would load from cache. On a cached page you could use jquery / ajax function to load data from whatever source you see fit.

On a HTML5 application you could use application cache. Try this page for a quick start: http://www.w3schools.com/HTML/html5_app_cache.asp

For browsers you could search for disable cache, to find good information sources. Once found how you can disable it, you'll probably find how you can enable or force it. Of course every browser is different in this matter. Example: http://superuser.com/questions/461285/how-to-disable-caching-in-internet-explorer-9

I'm sure for some Internet Explorer things there are policies you can edit, concerning caching.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
myyisAuthor Commented:
Thank you, helped.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.