Select to view content in your preferred language

Changes not showing

1134
4
01-02-2014 08:08 AM
deleted-user-yA_w_FC9FKe5
Deactivated User
Whenever I make a small change to my application using the config file I have to do a delete browser history.  Really annoying.  Do you know a way that I can keep from having to do this?  I imagine from time to time after I roll this out I will have some updates for this or at least for the layers. 

Thoughts, suggestions or ideas?
Tags (2)
0 Kudos
4 Replies
EricGardecki
Deactivated User
It is quite frustrating that this is an issue, and the only fix I know of involves making some changes to the flexviewer source.  To me this is a huge issue so I had to learn how to do this.

See these threads to get you started:
http://forums.arcgis.com/threads/16664-Preventing-client-side-caching-of-the-Flex-Viewer
http://forums.arcgis.com/threads/57121-browser-cache

This time around, for 3.6, I had to compare the Configmanager.as to the edited one found in that thread and edit accordingly.

It's a big PITA so hopefully something like this will get worked into a future version!
0 Kudos
EricGardecki
Deactivated User
Here is my ConfigManager.as for 3.6.   Replace the one in the source and compile and you'll be all set.

I also made the changes to the index.html found in the links above.  With these two adjustments all changes are seen immediately on page reload.
0 Kudos
by Anonymous User
Not applicable
Thanks for this 3.6 file Eric. I've never touched source code or Flash Builder, but I seriously need these maps to not be cached! Going to go muck around in a trial version of FB hopefully, again thanks for these tips.
0 Kudos
by Anonymous User
Not applicable
I think it worked. I'm using the compiled version of ArcGIS Viewer for Flex 3.6, so in case another newb hits this problem, here is exactly what I did. Sorry for the verbose response but I wanted to post this on the off-chance that someone needs a very very simple and obvious step-by-step as a non-developer.


1. Downloaded trial version of Flash Builder 4.7 from Adobe website onto the server where I use ArcGIS Viewer for Flex normally
2. Downloaded Adobe Flex SDK 4.6 from Adobe, which I think was unnecessary because Flash Builder already seemed to have it. Unzipped in C:/Documents.
3. Downloaded Flex API 4.6 library from ESRI and unzipped in C:/Documents
4. Downloaded and DID NOT UNZIP the MASTER source code (see next step) for ArcGIS Viewer for Flex 3.6 from GitHub as a zip file to C:/Documents
5. Backtracked and followed these instructions carefully: http://resources.arcgis.com/en/help/flex-viewer/concepts/
6. Once the FlexViewer project was imported to Flash Builder (see step 5) I ran it with the green Play button and it launched successfully in a browse.
7. From here, in the FlexViewer project folder created by FB (C:\Users\[me]\Adobe Flash Builder 4.7\FlexViewer) I found the index file that needed editing (C:\Users\[me]\Adobe Flash Builder 4.7\FlexViewer\html-template\index.template) as well as MapManager.mxml (C:\Users\[me]\Adobe Flash Builder 4.7\FlexViewer\src\com\esri\viewer\managers\MapManager.mxml) and edited it in Notepad++. I took the changes from the Forum post listed above: http://forums.arcgis.com/threads/57121-browser-cache. Finally I copied in Eric's 3.6 ConfigManager.as to overwrite the one in there (C:\Users\[me]\Adobe Flash Builder 4.7\FlexViewer\src\com\esri\viewer\managers\ConfigManager.as).
8. I refreshed the FlexViewer project in Flash Builder (I had no idea what I was doing but I had changed files so I figured I should) and then I hit the green play button. A dialog ran saying it was performing a build and mentioned compiling, so I waited.
9. When it was done I went to the output folder for the project to copy what I hoped were the compiled files (C:\Users\[me]\Adobe Flash Builder 4.7\FlexViewer\bin-debug), where bin-debug is that default output folder. I was slightly disturbed that the files' last updated times were from earlier and not since the latest project build...but I moved on, partly because earlier I had also manually changed the index.html file in this folder in addition to the index template.
10. I coped the index Shockwave Flash Object file, and all of the .swz extension files, from the FlexViewer project folder. I then went to my app folder for the web map I had already created using the compiled ArcGIS Viewer for Flex (C:\inetpub\wwwroot\Apps\exampleMap) and overwrote its files with these ones. I tested it in Chrome and after hitting refresh the map was updated with a change I had made in the logo.
0 Kudos