Forum: Ruby on Rails Problem in including javascript files

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
93d045dd1e7935eb0550aca14fa1577c?d=identicon&s=25 Chetan Thapliyal (Guest)
on 2006-05-12 10:23
(Received via mailing list)
Hi,

I am using this <%= javascript_include_tag '/editor/xyz.js' %> to
include javascript source to my code. But I am getting this as output
<script src="/editor/xyz.js?" type="text/javascript"></script>

I just want to know why I am getting a question mark in
"/editor/xyz.js?".

Thanks for any assistance in advance.

Regards
Chetan Thapliyal
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-05-12 11:45
(Received via mailing list)
Chetan Thapliyal wrote:
> Hi,
>
> I am using this <%= javascript_include_tag '/editor/xyz.js' %> to
> include javascript source to my code. But I am getting this as output
> <script src="/editor/xyz.js?" type="text/javascript"></script>
>
> I just want to know why I am getting a question mark in "/editor/xyz.js?".
>
I'm guessing that's to do with asset caching.  It shouldn't cause a
problem.  Asset caching works by attaching a timestamp from the last
modified time on the asset file to the generated links, so the browser
knows not to download it if it can avoid it.
This topic is locked and can not be replied to.