Discussion Forums  >  WebViews and HTML for Mobile

Replies: 5    Views: 67

aquila198
buzztouch Evangelist
Profile
Posts: 473
Reg: Jul 22, 2011
location unknow...
10,330
03/21/13 08:39 AM (11 years ago)

Jquery/html - code to keep from caching html link

Howdy Folks - Does anyone know of a snippet of code I can use to keep an html file from caching in the app? Example: Baseball Schedule for Team A [page is written in query] {Note, this file lives in the app. The "dates.html" link is permanent, but I want to be able to update "dates.htm"} Code that grabs the 2013 schedule. <div id="contact_buttons"> <a href="http://www.baseball.com/dates.html" data-role="button" data-icon="star"> My Baseball schedule</a> </div> What if.... 2014 rolls around, and the page that links to"dates.html" has cached that page. It's going to show old baseball game dates, even though "dates.html" has been updated. Is there any snippet to get the code to Never cache?
 
aquila198
buzztouch Evangelist
Profile
Posts: 473
Reg: Jul 22, 2011
location unknow...
10,330
like
03/21/13 10:38 AM (11 years ago)
doh.... this does the trick: <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/21/13 12:43 PM (11 years ago)
If you're using the HTML Doc plugin, there is an explicit setting NOT to cache, and to reload each time. Cheers! -- Smug
 
Antonios
Apple Fan
Profile
Posts: 381
Reg: Feb 12, 2013
Korinthos, Gree...
4,610
like
03/23/13 09:30 PM (11 years ago)
@smugwimp where is the no cache setting?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
03/23/13 11:13 PM (11 years ago)
in the control panel settings for the HTML Plugin... Under the area called 'Document Behavior'. Cheers! -- Smug
 
Antonios
Apple Fan
Profile
Posts: 381
Reg: Feb 12, 2013
Korinthos, Gree...
4,610
like
03/24/13 04:28 AM (11 years ago)
you mean the "force refresh" option?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.