I have done project in Symfony 2.1 in which session management works properly. i.e. after logout it shows login page.But while cliking on back button of browser it shows previous page which should not be shown as per requirements. If any action done on that page redirects to login screen again means no action is permitted after logout.
I tried different solution shown by others like:
In twig:
<META Http-Equiv="Cache-Control" Content="no-cache, no-store, must-revalidate">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">
But didn't workout for me.Any other way specially in Symfony to prevent this.Any suggestions are helpful.
Related
I'm wanting to put my OpenGraph properties into a shared view to be used across multiple pages however Facebooks sharing debugger is giving me back errors despite following the open graph documentation.
The Code
<head>
<meta property="og:image" content="www.myimage.co.uk/images/image.png"/>
<meta property="og:title" content="#ViewBag.Title">
<meta property="og:site_name" content="...">
<meta property="og:url" content="www.myimage.co.uk/">
<meta property="og:description" content="...">
<meta property="og:type" content="website">
</head>
Facebook debugger
When I submit my url into the debugger and press debug, and even scrape again to make sure it's giving me back this error:
Inferred Property
The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
I've also inspected my webpage in the browser and the code is exactly as stated above. Is there something obvious that I'm missing?
Edit:
Using the 'scraped url' option on Facebook's debugger, it shows that the meta tag's aren't being picked up by Facebook's scraper - is there a way of ensuring that this data is picked up by a scraper?
How to clear the cache of browser when hitting the back button on browser (IE,Chrome,Firefox Safari) In MVC4.tried with the following code but its not working
How to refresh page when hitting back button on browser (IE,Chrome,Firefox Safari)?
Can you guys help me out to do this.
Thanks,
Subhnai.
You need to tell browser to discard old page and fetch latest from server by specifying it in HTML > Head
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Cache-control" content="no-cache, no-store">
<meta http-equiv=" Pragma" content="no-cache">
I have tried using this cache control tag in all my jsp pages.
But the data in the pages is not being refreshed while navigating from one page to another in IE10 unless I refresh the page or clear the cache manually everytime. There is no such refresh issue in chrome and firefox. I used
window.location.replace() for navigation between pages.
What else can be done for clearing cache in IE10+ through jsp pages?
I want to know how to instruct Chrome not to use a cached version of a page. I cannot get Google Chrome [15.0.874.106 m] to load the latest version. There was a typo on the page and I've corrected it. Other browsers fetch the corrected page. Chrome, not. Here below is what I have in the header section; should I add anything or change something? Also, the browser is not set up "Under the Hood" to use any sort of DNS-prefetching. Just to be clear, I don't want to clear the cache manually, but want to know how to manipulate Chrome's page-caching policies in a declarative manner. Thanks
P.S. I had this problem once before (see this question) but the circumstances are somewhat different this time, so I don't know what's going on. This page too is being displayed in a frame, but it had a no-cache policy from the get-go.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML LANG="en-US">
<HEAD>
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="Wed, 26 May 2010 00:00:11 GMT">
<META NAME="ROBOTS" CONTENT="NOARCHIVE">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
.
.
.
</HEAD>
Okay so, firstly this is a website where the user sees a list of tasks which are uncomplete. It should work so the user clicks a complete button and then the item no longer shows, it seems not though!
When they click the 'complete' for an item I have onclick function executes a SQL update statement and then does a response.redirect back to that page, the sql statement executes correctly, the page does redirect BUT the list item is still there!
If the user then exits the page and comes back to it the list item HAS disappeared, this makes me think that the page is caching, however I have put the following in place to stop this:
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate, post-check=0, pre-check=0" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
which is fine on my BlackBerry Bold running OS 5.0, but does not work for customers with BlackBerry Bold running OS 4.x
Any ideas of what this could be are most appreciated.
Try something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Expires" CONTENT="0">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<title>Expires Example Page</title>
</head>
<body>
Hello World!
</body>
</html>
This is from the Blackberry support forum: http://supportforums.blackberry.com/t5/Web-Development/Browser-cache-and-quot-Back-quot-button/m-p/155986
How about this
http://developer.blackberry.com/bbos/html5/documentation/rim_cache_element_1264486_11.html
try changing disableAllCache to false in the config.xml
<rim:cache disableAllCache=["true" | "false"]
aggressiveCacheAge="time"
maxCacheSizeTotal="size"
maxCacheSizeItem ="size" />