PDA

View Full Version : Qwebview back process page agin instead of just displaying the previous info



ShapeShiftme
11th May 2012, 12:26
Good day Ive have an interesting little problem.

I have a program using qwebkit. i process a page using url variable in coldfusion for example the page url is

localhost/processcode.cfm?mycode=20145.

What that code will do is insert the detail into a mysql database.

So if i then browse to another page then click the back button when it opens the page it seems to reload the page instread of just displaying the info.
So i will then have the code inserted into the database again. so after a few attempts i have a list of codes that shouldnt be there duplicated.

I dont know if i have to use QWebPage::NavigationTypeBackOrForward
and if so how or if i must enable cache . can somone please be of some assistance.

Perhaps a code example will be very nice.


Regards

ShapeShiftme
16th May 2012, 09:26
Nobody have any ideas?

tferreira
16th May 2012, 11:27
Can't you validate the duplicates in the server-side code?

ShapeShiftme
17th May 2012, 02:27
I could do that but there are alot more than one page where this is happening so that is alot of changes on the serverside.
if i was just able to stop webkit from doing it that would be easier "maybe"

Regards