Solved

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

Posted on 2016-09-28
7
94 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 

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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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

Suggested Solutions

Title # Comments Views Activity
parse url to form? 7 25
PHP and MSSQL Arrays and Variables 3 25
Internet options/Settings 1 46
Internet Explorer 11.0 fails to open 34 62
This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

829 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