问题描述
我看到这种奇怪的行为(或者可能是我失去了一些东西)。
我的WebSphere 8.5。部署EAR。其工作罚款。
I see this strange behavior (or may be I am missing something).I have WebSphere 8.5. Deployed a EAR. Its working fine.
相反,重新包装和部署每一次的小改,我只是复制了JS和CSS文件直接到WebSphere爆炸文件夹,并覆盖现有文件。我看到的变化越来越体现。
Instead of repacking and deploying every time for small change, I just copy the js and CSS files directly to the Websphere exploded folder and overwrite the existing files. I see the changes are getting reflected.
我刚刚更新JS文件,并添加一对夫妇的jQuery的功能和复制类似上面的文件。现在,当我刷新页面,我看到更新code(这是在文件的中间位置)。但是js文件并不是在所有的浏览器3(IE8,Chrome和FF最新)完全加载。在过去的10日线这是越来越切断都是如此。
I just updated a JS file and added a couple jQuery functions and copied the file like above. Now when I refresh the page, I see the updated code (which is somewhere in the middle of the file). however the js file is not loading fully in all 3 browsers (IE8, Chrome and FF latest). It's getting cut off in the last 10 lines are so.
该文件有1784行。不知道如果在浏览器端的大小限制或WebSphere与它修修补补还是其他什么东西是怎么回事。任何想法?
The file has 1784 lines. Not sure if there is a size limit on the browser side or WebSphere is tinkering with it or something else is going on. Any idea?
我做了检查我复制到爆炸的WebSphere文件夹中的js文件。它具有完整的code。
I did check the js file I copied to Exploded WebSphere folder. It has complete code.
请注意,该页面除了这其中有几个JS文件(jQuery和其他文件)。
Note that the page has a few more JS files (jQuery and other files) in addition to this one.
编辑:
我想的WebSphere是保持文件的大小地方(也许?),只有每一次发送的大小,除非有干净的部署或重新启动(?)。
I think WebSphere is keeping the size of the file somewhere (maybe?) and sending only that size every time, unless there is clean deploy or restart (?).
我删除更新code几行。现在,浏览器加载,正是许多许多code的其他行。有一次,我彻底删除我的code,它加载完整的文件。 (这是不是与code的一个问题虽然)。
I removed a few lines of updated code. Now the browser loads, exactly that many number of additional lines of code. Once I remove my code completely, it loads the full file. (This is not an issue with the code though).
有没有办法,我需要在WebSphere中清除缓存?
Is there a caching that I need to clear in WebSphere?
推荐答案
查看此网页它热部署和动态重新加载。一般来说它说,你可能需要重新启动应用程序。
Check this page it Hot deployment and dynamic reloading. In general it says that you may need to restart the application.
还要检查,如果启用了应用程序重新加载,但我不知道这是否是相关的静态文件。
Also check, if application reloading is enabled, however I'm not sure if it is relevant for static files.
如果类重载启动和轮询间隔较大
大于零(0)时,应用程序的文件被后重新加载
应用被更新。在Web JavaServer页面(JSP)文件
模块,Web容器重新加载JSP文件仅在IBM扩展
JS preloadingEnabled
在 jspAttributes
的 IBM-网络ext.xml
文件
设置为true。您可以在编辑时设置 JS preloadingEnabled
为真
在组装工具的Web模块的扩展部署描述符。
您可以从控制台的评论或通过wsadmin脚本来提供重新启动应用程序。
You can restart app from console as provided in comments or via wsadmin script.
这篇关于JavaScript文件并没有在所有的浏览器完全加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!