Beginner jQuery is having trouble with the links and the page redirect and page caching.

Hi all

I'm trying to update an old legacy of multipage site (each page has headers html etc.), adding jQuery Mobile. Most of the time it goes well, but I'm having some problems with the links, the redirect of the page, and caching.

I write javascript like this...

< script >

-do things - then-

Window.Location.Replace ("Page1.html");

< /script >

and links like this


< a class = "-ui ui-btn-b btn tsize1" href = "page2.html" rel = "external" > page 2 < /a > "


CACHING ISSUES


On many pages - such as those that I have problems with, I've added no caching of code as...

< head >

< META HTTP-EQUIV = "Pragma" CONTENT = "no-cache" >

< META HTTP-EQUIV = "Expires" CONTENT = "-1" >

... more...

< head >

Problem: for example, I can go to Page 1 and click on a link to go to page 2 and page 2 has the lines "no cache" header. The problem is that a fresh change of page 2 does not appear even with no cache lines above and even if I hit refresh in the browser that I thought it was supposed to reload the page (live get of the site). On the contrary, it seems to continue to see the old content before the update.

In another case I could be on page 21 and click on a link that goes to the publicationfootnote22 and made a few treatment database and then goes to the page33. In this case, my fees top22 updates are not appearing and showing just the old cache data.

Q: what is the best way, at least while I am writing code, to force the Page to refresh (non-cache), I can see my updates all the time, because otherwise it becomes very confusing because I'm sure you know.

Thanks in advance: Dave

Hi Dave,.

Are you handy with your developer tools? It's always where I head when I need to look inside something. Before getting anywhere in addition or developed, check the response code you get for the page request and see what is the numeric code. If it is 200, you get a new copy. If it is 304 then your browser is striking the same content or something in your UI is to preserve the previously loaded document fragment.

Photos make it easy, Chrome this is grabbing a small page for the first time and with disable cache enabled, and we get the status code 200:

If I keep refreshing with "Disable cache" activated so I keep getting GET/200, copy fees.

However, delete the "disable cache" to speed things up and the server and the client negotiate and check if she even needs to send you the document (if she thinks she's changed), and if not, of course you GET/304, or "load cache:

Whenever I update I get GET/304, hitting the cache.

Make sure your requests are GET/200 if you expect not to be cached.

Tags: Coding Corner

Similar Questions

  • I'm having trouble with the serial number

    I'm having trouble with the serial number

    If you are hearing 3 or an earlier version, the activation server was arrested.  Take a look at this page, Download Adobe Acrobat 7 and Adobe Creative Suite 2 products for instructions on how to download another copy of AA3.01 and use a generic serial number.  (For the purpose of the present hearing 3 counts as CS2 even though he was not part of the Creative Suite then.)

    However, if you are using a later version of the hearing (CS5.5 until the current 2015 CC) while the others are right... you will need to contact customer support Adobe because only they have the serial number details.

  • Im having trouble with the color on my xbox

    I have problems with the color on my xbox since I did an update, as well as I was updating a pop up was held to let me watch the first of the new game black ops, the color is off and I can't play my game like this. What can I do about it?

    Hello

    Answers has no influence on the XBox or XBox Live must
    contact with them.

    XBox - Support
    http://support.Xbox.com/en-us/pages/default.aspx

    XBox - Contact us (support)
    http://support.Xbox.com/en-us/contact-us

    XBox - Support Forums - and my XBox (top-right)
    http://forums.Xbox.com/

    Xbox technical support phone number

    • Toll-free: (800) 4MY-XBOX or (800) 469-9269

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • Anyone having trouble with the last update. Does not load on any machine

    Title says it all

    Well, well, well. It seems that I have to answer my own question.

    I downloaded the patch from www.adobe.com/support/downloads/product.jsp?product=1&platform=Windows

    He also wanted to stop with the same error but, unlike the update of the program, I got an option ignores. On the basis, that I couldn't be in a worse place, I took this option and it worked!

    Maybe something wrong with the patch?

    David

  • Still having trouble with the Adobe viewer

    I always feel the question when I have several objects of State (State 1 is off the page, State 2 is on the page) the hidden state (State 2) appears on the Adobe viewer iPad when you click on the | icon in the menu at the top left. In the decorative Panel to the creator 'tap to play/pause' is not checked.  "Cross Fade" and "Hide before playing" is checked.

    Any help would be appreciated!  Thank you!

    What I was able to determine: oject to the containing all States.  The State where there is no object in view must appear first. (any number of State it is, just need to be first in the list)  When I did it for my MSO there was no problem viewing!  Please point me in the right direction. much appreciated!

  • Is anyone having trouble with the header does not stay and he jumps back?

    After this last update of Mozilla Firefox my head with persona disappeared. After placing my cursor at the top of the screen it suddenly came back but on a part of it and you can't see my character lighthouse, I chose previously.

    You are welcome.

  • Im having trouble with the pressure on the calligraphic brush on my illustrator. If it is not included in the trial version? Thank you

    maroon.png

    Hi Noel,

    Pressure of the brushes in artificial intelligence is related to the entrance of the devices that support of pressure. So if you need to use pressure with your laptop, you can buy Wacom intuos tablets or can be buy an external monitor supporting pressure.

    Sanjay.

  • Having trouble with the installation of the printer?

    Hi, I bought the Premium C410B photo all in one printer, but after trying so many times I can't still manage to install all the software for it. Fax does not work, the Hp Solution Center does not work. I even rebooted my system. I don't see the fax printer in the control Panel\Hardware and Sound\Printers page. I tried HP diagnostics as well, also downloaded latest software Web site. Still no luck.

    Help, please

    Thanks for the help I ended up by format the pc now it works.

  • I have Windows vista and I am trying to implement a p1000 hp photosmart printer but having trouble with the drivers

    E-mail address is removed from the privacy *.

    Make sure you have Windows (32-bit or 64) and download the driver for an hp website.

    Do not connect the printer when you are asked to do.

    Good luck.

    Higher than http://www.computerstar.ca/ tech

  • Newbie - having trouble with the background color when you open new document

    Hey everybody and thanks for the help in advance. New to the Forum and have not been able to find the answer online. Everytime I open Photoshop (using Adobe Creative Cloud) I set my size, my background to white, etc.. The document opens always look like this: http://screencast.com/t/BzCYc4akl

    Almost as if it is transparent, but I have not selected. Can someone help here? Thank you!

    Hello

    Looks like that the gates are activated.

    If in photoshop, you go to view > Show and click on the word grid, does make a difference?

  • Having trouble with the PLSQL variables.

    OK, I'm an intermediate to advanced multilingual programmer, but somehow the art of using variables and guests in plsql escapes me.

    Here's what I have to do.

    I need to pass a parameter of 4 figures, in the form of MMYY, for the month and the year running for.

    I have so I need substring on the month and year and use them in the two header of State as well as in filter criteria.

    I have it all working except participle past variable and using substring to the mm in separate variables of the AA and then using the 'yy' in where clause.

    This is a versino abbreiated of my script so far. As you can see I've still '07' hard-coded. What I have to do is to take the LV_MMYY (which is 4 characters), substing on the last 2 of them (substr (& LV_MMYY, 3, 2)), store that value in a variable and then use that variable in the where clause.

    You can provide any help would be greatly appreciated.

    > > > > > > > > > > > > > > > > > > > > > > > > > > > >

    SET linesize 157 54 echo OFF pagesize
    THE VALUE NUM 6
    SET FEEDBACK OFF
    SET TO SHOW OFF
    SET VERIFY OFF
    SET RECSEP EACH

    SET LV_MMYY = & & ENTER_DATE_IN_MMYY_FORMAT;

    Mymonth COLUMN NOPRINT new_value by TANK
    WE BREAK mymonth
    COLUMN mymonth new_value by LV_MONTH
    SELECT TO_CHAR (TO_DATE (SUBSTR ('& LV_MMYY', 0, 2), 'mm'), 'MONTH') mymonth FROM DUAL;

    Myyear COLUMN NOPRINT new_value by TANK
    WE BREAK myyear
    COLUMN myyear new_value by LV_YEAR
    SELECT '20'. SUBSTR ('& LV_MMYY', 3, 2) myyear FROM DUAL;

    COLUMN today NOPRINT new_value by TANK
    BREAK ON TODAY
    COLUMN TODAY NEW_VALUE MYDATE
    SELECT TO_CHAR (SYSDATE, 'YYYYMMDD') today FROM DUAL;
    CLEAR BREAKS

    TTITLE LEFT ' report "MYDATE" JANUARY THRU 'LV_MONTH' for the year financial report 'LV_YEAR' ' SKIP 2 -.

    SELECT *.

    Of
    wrk_tab
    WHERE
    an = '07' - needs to get of the parameter
    ;
    SQL> var yy varchar2(2)
    SQL> begin
      2  :yy := substr('&LV_MMYY',3,2);
      3  end;
      4  /
    vecchio   2: :yy := substr('&LV_MMYY',3,2);
    nuovo   2: :yy := substr('0310',3,2);
    
    Procedura PL/SQL completata correttamente.
    
    SQL> select :yy from dual;
    
    :YY
    --------------------------------
    10
    

    If your where condition becomes

    year =: yy

    Max
    http://oracleitalia.WordPress.com

  • Trouble with the Satellite Pro L300 Ethernet controller driver

    Hello

    I bought a Toshiba Satellite Pro L300 Model (PSLB9A - 064022)

    Put XP Pro/SP2-Having trouble with the Ethernet controller driver.

    I downloaded the driver from the appropriate list (Toshiba support) only network via another PC memory = car lappy

    Realtek_LAN_56861032008_XP.exe

    install
    installed in a folder named c:\ "DELL"-(WHICH can not be move?)
    drivers R86360
    OF this dossier, I do the "setup."

    broad com 440 x - installs as everything is good,
    made just TWO yellow controllers.in etha...
    \
    but isn't she suppose to be integrated realtek 10/100 Mbit / s Ethernet TX.

    Can someone please point me in the right direction.

    Thanks in advance...

    Steve

    Hello

    It seems that the Australian model, try this one:

    http://file.MyToshiba.com.au/file/Download/Resource/File/13002/Realtek_LAN_56861032008_XP.exe

  • Hello, I recently bought a new iMac and I am wanting to install Lightroom for her, but I'm having some trouble with the key to series is not recognized. There is no disk drive on the new Mac, so I can't just pop the disc in. Is there anyway I

    Hello, I recently bought a new iMac and I am wanting to install Lightroom for her, but I'm having some trouble with the key to series is not recognized. There is no disk drive on the new iMac, so I can't blow my disc. Is there a way I can download it simply by using the key to series on my package? I tried the section "Redeem Code", but said air key is not valid. Thank you

    Download & install instructions https://forums.adobe.com/thread/2003339 can help

    -includes a way to go to a page to download the Adobe programs if you do not have a disk or drive

    -Cloud desktop http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html

    -Cloud Getting Started https://helpx.adobe.com/creative-cloud.html

    -you will need to enter your original serial number during the installation for non-Cloud programs

    - or kglad links in response to #1 here can help https://forums.adobe.com/thread/2081216

    Also go to https://forums.adobe.com/community/creative_cloud/creative_cloud_faq

  • Im having trouble with my iphone 16 GB ios 9.3.3 5s (G 13, 34) receive error code 22 tries to connect to the server, and nowhere suggestions?

    Im having trouble with my iphone 16 GB ios 9.3.3 5s (G 13, 34) receive error code 22 tries to connect to the server, and nowhere suggestions? I have tried almost everything turn power switch wifi in the middle and doing it to try to track down the problem in the Device Manager and im completely disgusted

    Have you tried turning off and back on again?

  • having problems with the pop-up windows of analytical Google all of a sudden and now the pages are crashing or being redirected

    original title: google analytics popups

    Ive been having problems with the Google analytic pop-up windows all of a sudden now pages break or redirected, I've ran Malware, Windows Defender, a direct care, Avira, Avast and F-secure, and nothing seems to have read on other forums to help, that his may be a Trojan horse: Trojan.osx.Dnschanger.B... ive also rebooted my router as suggested in some forums , but nothing seems to help?

    Hi NicolaaTC,

    See the links below and check if it works.

    What is the browser hijacking?

    http://www.Microsoft.com/protect/terms/hijacking.aspx

     

    Difficulty of your web browser hijacked

    http://www.Microsoft.com/security/spyware/browserhijacking.aspx

Maybe you are looking for

  • I'm not able to open my documents pages. I get the message: the requested index.xml file is missing.  I wonder if it is because I have updates 10.11.5

    I have an iMac (20-inch, mid 2007) processor 2 GHz Intel Core 2 Duo 3 GB 667 MHz DDR2 SDRAM memory and recently updated to el capitan 10.11.5.  I have Pages ' 09, and I can't open my documents pages and get the message: The index.xml file required is

  • Hard drive 1 (301)

    Hello I have a problem starting my laptop, the hard drive 1 error (301) What will I do, please? Kind regards

  • How can I move files system recovery to the original location?

    I use Windows 7 on a HP Pavilion P6000 series.  I believe that the Recovery Manager created Windows System Recovery Files folder on the C: drive (from .wim files) created on an external drive, and I want to move them to the original location.  Just c

  • Shiro and ADF Essentials

    Hello worldI work with ADF-Essentials 12 c, JDeveloper 12.1.3.0.0 and try to implement Shiro security framework. I migrate application to 11g.The deployment of my Oracle ADF application to a stand-alone Weblogic Server through an EAR file, which requ

  • Interactive PDF - layout

    Hi communityI have a strange problem.When I export my interactive PDF file available that I designed is not show.Instead of green clear beeing my forms are blue with a red boarder.What I am doing wrong?When I click on the formfields, they become gree