Solved

Get a certain webpage to load everytime and ignore previous cache settings

Posted on 2016-09-28
7
98 Views
Last Modified: 2016-11-03
Hi There

I am doing a website for a client and part of it requires that the visitor is displayed a list of the nearest locations. This involves the use of the geo-locate function. Most browsers (desktop or mobile) require that the user select "Allow" or "Deny". Which is perfect. But if someone presses Deny just the once, then they do not get asked the question again.

What we would like to do is disregard the cache on the page every time they visit. By all means let them choose again if they wish to share their location or not. But we need to give them the option to decide everytime.

Our scripting guy is saying that they cannot use the no-cache no-store function to achieve this and there is no other way to do it so we just have to forget about it. I find this difficult to believe. There must be some way to either disregard a pages cache on load or to force the permission to be asked everytime.

Any suggestions?
0
Comment
Question by:doey
  • 3
  • 2
  • 2
7 Comments
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41820449
Google provides an article dedicated to helping you get the users' location: https://developers.google.com/web/fundamentals/native-hardware/user-location/user-consent?hl=en

It sounds like, depending on browser behaviour which is beyond the control of the developer, you may only get to request the location once per domain, which is why Google is saying above how important it is to not just request it on loading the landing page of the site.
0
 
LVL 35

Expert Comment

by:Terry Woods
ID: 41820497
It is possible to detect when the user has declined to provide their location, in which case the best thing you can do is to link to instructions which tells them how to adjust browser settings to re-enable it.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41820504
I almost always click on Deny when I get those requests.  On the one site I did with Google Maps, we asked for the users location to display the closest locations and did not use the browser geo-location.  I don't think you can force the browsers the way you want.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:doey
ID: 41822294
Hi Dave

You say that on a particular website you "asked for the users location to display the closest locations and did not use the browser geo-location." Do you mean that you physically asked for them to type in their location?
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 41822355
Yes, it's a form that let's them enter their address and returns a Google map with the locations nearest them.  It's on this page:  http://www.darkhorsecrankworks.com/dealer.html
0
 

Author Closing Comment

by:doey
ID: 41871962
Although my solution required a different approach, this led me in the right direction.

Thanks Dave
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41872416
You're welcome, glad to help.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question