Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8948483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:00:15+00:00 2026-06-15T13:00:15+00:00

What is the search rule for static content when you link it within a

  • 0

What is the search rule for static content when you link it within a heist template?
I get a few problems related to javascript files not being found.

So sticking my “myjavascript.js” and “jquery.js” into the root of “static” directory seems to be working when the URL supplied is, for instance, /index. If the URL is /something/index then it fails to locate my javascript files in the root of “static” directory. So putting them in “static/something” fixes it. Anyway, I ended up sprinkling copies of my javascript files all over the place so they can be found under different URL strings.
So, it is either I am using the wrong location or my links are incorrect within the template.

Given the link <script type="text/javascript" src="/js/jquery.js"> </script> where would it look for the file? What about src="jquery.js"?

I also get these type of errors from javascript console if I put the files under “static/js”:

Resource interpreted as Script but transferred with MIME type text/html: "http://0.0.0.0:8000/js/jquery.js". new:6
Uncaught SyntaxError: Unexpected token < :8000/js/jquery.js:1
Resource interpreted as Script but transferred with MIME type text/html: "http://0.0.0.0:8000/js/base.js". new:6
Uncaught SyntaxError: Unexpected token < 

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:00:17+00:00Added an answer on June 15, 2026 at 1:00 pm

    This totally depends on how you define your routes. I usually put my javascript in static/js, resources/js, or resources/static/js, but any location is fine. The key is how you route that directory. You probably have a route something like this:

    (“static”, serveDirectory “resources/static”)

    This means that if you have jquery.js in the resources/static directory, then it will be available at the url http://localhost:8000/static/jquery.js. This would mean that you would put src="/static/jquery.js" in your script tag. The first part of the routing tuple determines the URL path and the second part of the tuple determines the directory on the local filesystem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Search for good JAVA lib for playing with POST-GET requests - Is there any
Many search engines are not using meta keywords and Google through many recent updates
I'm using codeigniter to create a search page. I'd like to rewrite a GET
I have the following mod_rewrite rule: RewriteRule ^([^/.]+)/?$ search.php?action=procedure&procedureName=$1 This works fine in redirecting
I have added a Web Address rule to a Search Scope and set the
The problem is i don't know how to apply a css rule for 'Search
I have a rule in my .htaccess which is RewriteRule ^([a-zA-Z0-9-_]+)$ listing-search.php?profile=$1 [QSA,L] RewriteCond
i am using this form to search on my site <form id=search action=/search.php method=get>
When I perform a jackrabbit (version 2.2.9) search and I call get row.getValue(rep:excerpt()) the
I am using the following rewrite rule: RewriteRule ^search/(.*)/(.*) search.php?letter=$1&num=$2 [NC,L] It works fine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.